10-08-2019 05:34 AM
Hi, i'm using alfresco 5.2 and i'm using rest api. I recently developed my software to upload a file to admin file manager. What i want to do right now is, upload my file to a specific folder in admin.
Imagine i have a folder named "reports" and my files should upload to "reports" folder.
File upload as "filedata" and i tried to provide "destination" as "sample" and it wont upload my file to "sample" folder. It just upload to the root of the folder. I provided my folder nodeRef as folder nodeRef. And then i tried to upload back again using "uploaddirectory" and for this i provided "sample" which is my folder name. But nothing worked.
What should i do in my case ?
10-09-2019 10:24 AM
"destination" should be the nodeRef of the target folder.
If you are uploading to a site, then siteId and container id can be provided. Else you can pass nodeRef of the existing folder using destination parameter.
You can use "uploaddirectory" in combination with either destination or siteid and containerid (if uploading to a site). where upload directory is a subfolder
Here is the detailed description for upload api:
Return status: STATUS_OK (200)
Value | Description |
---|---|
json | The default response format |
user | The authentication access |
required | The transaction level |
any | The format style |
Explore our Alfresco products with the links below. Use labels to filter content by product module.