How to upload file to specifc folder Alfresco

26 views Asked by At

I'm trying out this and it works like a charm the file gets uploaded to the root folder.

import json
import requests

url = "http://localhost:8080/alfresco/service/api/upload"
auth = ("admin", "admin")
files = {"filedata": open("/tmp/foo.txt", "rb")}
data = {"siteid": "test", "containerid": "documentLibrary"}
r = requests.post(url, files=files, data=data, auth=auth)
print(r.status_code)
print(json.loads(r.text))

But how can I upload it to a specific folder? How do I define that and where?

I tired using nodeid but it did not work, any one got any ideas?

0

There are 0 answers