Uploading to azure blob storage from SAS URL returns 404 status

非 Y 不嫁゛ 提交于 2019-12-07 03:56:26

Found the solution...

let request = NSURLRequest(URL: url) produces a GET request and even passing it to uploadTaskWithRequest persists this request type, whereas I thought this call would change it to a PUT or POST request signifying the upload.

Defining the iOS request as

let request = NSMutableURLRequest(URL: url)
request.HTTPMethod = "PUT"

was successful. And the response returned was a 201 created.

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