直接从浏览器上传文件天青Blob存储? [英] Upload file to Azure Blob Storage directly from browser?

查看:499
本文介绍了直接从浏览器上传文件天青Blob存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能创建一个HTML表单,允许互联网用户直接上传文件到蔚蓝的BLOB存储,而无需使用另一台服务器作为中介? S3和GAW BLOBSTORE都允许这一点,但我不能找到蔚蓝Blob存储任何支持。

Is it possible to create an html form to allow web users to upload files directly to azure blob store without using another server as a intermediary? S3 and GAW blobstore both allow this but I cant find any support for azure blob storage.

推荐答案

做一起来看看这些博客文章直接从浏览器上传文件到Blob存储:

Do take a look at these blog posts for uploading files directly from browser to blob storage:

<一个href=\"http://$c$cread.word$p$pss.com/2012/11/21/uploading-files-directly-to-blob-storage-from-the-browser/\">http://$c$cread.word$p$pss.com/2012/11/21/uploading-files-directly-to-blob-storage-from-the-browser/

<一个href=\"http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript\">http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript

第二支柱(我写的),能使用HTML 5文件的API,因此不会在所有的浏览器。

The 2nd post (written by me) makes use of HTML 5 File API and thus would not work in all browsers.

基本的想法是创建一个共享访问签名(SAS)的BLOB容器。在SAS应该有许可。由于的Windows Azure Blob存储不支持 CORS尚未(这是由两个Amazon S3和谷歌的支持),您会需要承载HTML页面中,你希望用户上传文件的Blob存储。然后你可以使用jQuery的Ajax功能。

The basic idea is to create a Shared Access Signature (SAS) for a blob container. The SAS should have Write permission. Since Windows Azure Blob Storage does not support CORS yet (which is supported by both Amazon S3 and Google), you would need to host the HTML page in the blob storage where you want your users to upload the file. Then you can use jQuery's Ajax functionality.

这篇关于直接从浏览器上传文件天青Blob存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆