cancel
Showing results for 
Search instead for 
Did you mean: 

upload file with xhr?

bgvc
Champ in-the-making
Champ in-the-making
Hello
I try to use a dropzone.js plugin to upload some file …. I use POST method and in my console I have:
OPTIONS https://......alfresco/service… 405 (Method Not Allowed)
OPTIONS https://......alfresco/service… Invalid HTTP status code 405
XMLHttpRequest cannot load https://...../alfresco/service/….. Invalid HTTP status code 405

But when I try a simple <form> input=file method=post action=alfresco/service… in a html page without plugin,it works fine,

How can I fix that ? it only caused by dropzone.js…

(I tried to put another action=url with other server it works fine too…just with alfresco service I have error 405 and method=OPTIONS ….)

5 REPLIES 5

mrogers
Star Contributor
Star Contributor
No OPTIONS is not allowed.

bgvc
Champ in-the-making
Champ in-the-making
In my plugin I put POST method and it become OPTIONS alone.(in console error 405 not allowed…)

ghl
Champ in-the-making
Champ in-the-making
What you are experiencing is the correct behavior due to CORS.  You need to enable CORS for the resouces you want to give access to.

bgvc
Champ in-the-making
Champ in-the-making
How can I give access to this plugin from alfresco? I'm thinking the CORS is already enabled…. because when I try a simple html form upload It works fine and I havn't some cross-origin problem that way

bgvc
Champ in-the-making
Champ in-the-making
up Smiley Happy how can I enabled & allow XMLHttpRequest in cors to upload file ^^ someone knows