Rest API file upload - HTTP error 405

24 views
Skip to first unread message

rui.bu...@gmail.com

unread,
Dec 22, 2017, 4:02:13 AM12/22/17
to dotCMS User Group
Hi everyone, 
I'm trying to implement file upload to a certain structure using your code example from codeshare, but so far i've been unsucessful.

It keeps sending 405 Method not allowed on every request.

Any suggestions ? 

Best Regards,
Rui

rui.bu...@gmail.com

unread,
Dec 22, 2017, 12:28:44 PM12/22/17
to dotCMS User Group
I've seached the logs and found this related to my submission:

2017-12-22 16:51:00,536 INFO  [com.dotmarketing.portlets.contentlet.business.web.ContentletWebAPIImpl] (http-192.168.150.44-9080-2) Unable to set field File Asset to value send-file.vtl

 

Inside my send-file.vtl, i only have a <form> tag with a input type file, and a button for submission alongside with the "click" function for submission.

Chris Falzone

unread,
Dec 28, 2017, 9:28:05 AM12/28/17
to dot...@googlegroups.com
Are you sending the correct method?   POST is used for inserting new content and PUT is used for updating existing content.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/4715475b-12d8-4ca8-a9eb-d9602423460a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages