added upload vscode test
This commit is contained in:
parent
879bda7e36
commit
1972a5ca46
53
src/test/vscode/createNode.http
Normal file
53
src/test/vscode/createNode.http
Normal file
@ -0,0 +1,53 @@
|
||||
@baseUrl = http://localhost:8080/alfresco
|
||||
@username = admin
|
||||
@password = admin
|
||||
|
||||
### Find Folder
|
||||
# @name find
|
||||
POST {{baseUrl}}/api/-default-/public/search/versions/1/search HTTP/1.1
|
||||
Authorization: Basic {{username}}:{{password}}
|
||||
|
||||
{
|
||||
"query": {
|
||||
"language": "afts",
|
||||
"query": "=@cm:name:'Shared'"
|
||||
}
|
||||
}
|
||||
|
||||
@folderNodeId = {{find.response.body.list.entries[0].entry.id}}
|
||||
|
||||
### Upload File
|
||||
# @name upload
|
||||
POST {{baseUrl}}/api/-default-/public/alfresco/versions/1/nodes/{{folderNodeId}}/children?autoRename=true
|
||||
Authorization: Basic {{username}}:{{password}}
|
||||
Content-type: application/json
|
||||
|
||||
{
|
||||
"name": "TestFolder",
|
||||
"nodeType": "cm:content",
|
||||
"properties": null
|
||||
}
|
||||
|
||||
### Upload File
|
||||
# @name upload-form
|
||||
POST {{baseUrl}}/api/-default-/public/alfresco/versions/1/nodes/{{folderNodeId}}/children
|
||||
Authorization: Basic {{username}}:{{password}}
|
||||
Content-type: multipart/form-data; boundary=----Test
|
||||
|
||||
------Test
|
||||
Content-disposition: form-data; name="name"
|
||||
|
||||
TestFolder
|
||||
------Test
|
||||
Content-disposition: form-data; name="nodeType"
|
||||
|
||||
cm:content
|
||||
------Test
|
||||
Content-disposition: form-data; name="autoRename"
|
||||
|
||||
true
|
||||
------Test
|
||||
Content-disposition: form-data; name="filedata"; filename="test.txt"
|
||||
|
||||
This is a test
|
||||
------Test--
|
Loading…
x
Reference in New Issue
Block a user