02-10-2017 03:19 PM
Hey Guys,
I'm working on an app, and in my app I have the user login, which gets an alfresco ticket from the url:
http://localhost:8080/alfresco/service/api/login?u=memedude&pw=ilovememes
The string I receive back from this is:
TICKET_9aa49e5ff12d3cba95d62b4cd21cfc27bda4f1f3
Then when I try to access the upload URL and pass this ticket in like this:
http://localhost:8080/alfresco/service/api/upload?alf_ticket=TICKET_9aa49e5ff12d3cba95d62b4cd21cfc27bda4f1f3
I receive back a 403 forbidden. I've tried doing this the exact same way, except I login with the admin's credentials:
http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin
Works like a charm. I tried going into the Alfresco admin tools page, and I added the user into a group, and set a quota, and looked around. I'm still not able to get the user to pass authentication when I'm uploading the file.
How can I give these users the permissions to upload with the API, and not have to change the webscript to allow guests to download files?
Any tips / help would be appreciated guys,
Thanks!
02-13-2017 05:59 AM
I'm guessing that you're trying to upload to a target folder for which the user does not have write (add children) permission ? Here's a link to the deprecated API: File upload | Alfresco Documentation
If you're using Community, then I would recommend that you test an upgrade to the latest release and try out the new Alfresco 5.2 REST APIs for uploading new content Alfresco API Explorer (Create Node).
Regards,
Jan
02-13-2017 02:04 AM
Hi,
Instead of changing the upload webscript you should evaluate to write your own webscript for your specific needs.
Changing the default Alfresco API is not a good choice.
I hope this helps you.
02-13-2017 05:59 AM
I'm guessing that you're trying to upload to a target folder for which the user does not have write (add children) permission ? Here's a link to the deprecated API: File upload | Alfresco Documentation
If you're using Community, then I would recommend that you test an upgrade to the latest release and try out the new Alfresco 5.2 REST APIs for uploading new content Alfresco API Explorer (Create Node).
Regards,
Jan
Explore our Alfresco products with the links below. Use labels to filter content by product module.