fine-uploader azure originator in request instead of endpoint

假如想象 提交于 2019-12-25 12:54:28

问题


I am attempting to put blobs to azure storage and I believe I have the server side sas and azure CORS set up correctly. In my html I have var uploader = new qq.azure.FineUploader({ element: document.getElementById('fine-uploader'), debug: true, request: { endpoint: 'https://mystorage.blob.core.windows.net/mycontainer' }, signature: { endpoint: 'https://myserver/sas/' }, uploadSuccess: { endpoint: '/success' }, retry: { enableAuto: true }, deleteFile: { enabled: true }, cors: { expected: true, sendCredentials: true, },

In debug mode I see fine-uploader azure gets the sas correctly and then attempts to send the put request but instead of going to the azure endpoint as entered, it attempts to send it to the host as per this message.
Request URL:https://myhostsite/project/sr=c&sp=w&sig=Vh/QLKT3xhkbGBsiUAk4U1eEFpAcD87OK9%2BqgGd8cO4%3D&sv=2016-05-31&se=2017-04-26T22%3A34%3A57Z Request Method:PUT Status Code:405 Method Not Allowed


回答1:


Have you permitted PUT request in AllowedMethods while you set CORS rules?

I took your code with Fine Uploader 5.14.2 to upload an image file to Azure storage. It works fine on my site.

And here is a similar question from SO: Azure CORS Configuration



来源:https://stackoverflow.com/questions/43645741/fine-uploader-azure-originator-in-request-instead-of-endpoint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!