fine-uploader azure originator in request instead

2019-09-18 23:06发布

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条回答
▲ chillily
2楼-- · 2019-09-18 23:12

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

enter image description here

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

enter image description here

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

查看更多
登录 后发表回答