Tag: azure storage

Azure存储NodeJS修改默认超时设置

我想知道是否有可能为我更改Azure存储BlobService的默认超时设置。 从文档我可以看到,默认设置是: 调用blob,获取页面范围或获取阻止列表允许每兆字节2分钟完成。 如果一个操作平均每兆字节花费的时间超过2分钟,则会超时。 调用写一个blob,写一个块,或写一个页面,每兆字节允许10分钟完成。 如果平均每兆字节操作超过10分钟,则超时。 通过源代码看,我看到BlobService.getServiceProperties和setServiceProperties与这两个参数列出: @param {int} [options.timeoutIntervalInMs]用于请求的服务器超时间隔(以毫秒为单位)。 @param {int} [options.maximumExecutionTimeInMs]执行此请求时使用的所有潜在重试的最大执行时间(以毫秒为单位)。 最大执行时间间隔从客户端开始构build请求时开始。 在执行请求时,在执行重试之前,会间歇性地检查最大执行时间。 这两个参数是否等于上面的项目? 现在,当我尝试使用下面的代码使用getServiceProperties时,除了日志logging,度量和Cors数据之外,我没有给出任何信息。 这是Github页面上说的 blobSvc.getServiceProperties(function(error, result, response) { if (!error) { console.log('Result: ', result); console.log('Response: ', response); } else { console.log(error); } }); Result: { Logging: { Version: '1.0', Delete: false, Read: false, Write: false, RetentionPolicy: { Enabled: false } }, […]

Azure SDK – NodeJS – 重新上传blob时MD5散列值无效

我正在编写一个使用NodeJS Azure SDK的脚本来下载blob列表,并将blob重新上传到不同的存储容器。 var service = azure.createBlobService(); // download file service.getBlobToLocalFile(fromContainer, blob, localBlob, function(err, resp){ // resp here contains the MD5 hash // re-upload file specifying hash service.createBlockBlobFromLocalFile(toContainer, blob, localBlob, {contentMD5: resp.contentMD5}, function(error){}); // error here contains MD5 mis-match error }); 一些blob(不是全部)在上传时抛出一个错误,说明来自blob的MD5哈希是不正确的,即使我正在从getBlob操作传递MD5哈希: Error: The MD5 value specified in the request did not match with the […]

使用Azure进行存储的Web应用程序

我正在使用Azure维护一个Web应用程序,该应用程序将允许我通过Web界面将信息存储到存储系统中。 然后,我想使用客户端应用程序从该存储系统查询信息。 我注意到有很多技术可以用来完成这个,比如node.js,C#,php和python。 我很困惑如何进行。 我尝试使用使用Nodejs的Microsoft WebMatrix在Azure上创build一个网站,并且我能够创build一个简单的快速站点。 但是,我看不到存储元件与node.js接口的任何选项。 我不想花费太多的时间来制作一个自定义的Web UI,而是希望为UI使用某种模板。 根据我的要求,哪种技术最好继续? 谢谢!

用于本地连接的azure色表格存储的连接string

我是蔚蓝表存储+ node.js组合的云开发新手。 在所有样本中,我发现azure色存储的连接string只是那些用真正的Windows azure帐户。 由于我在本地PC上开发需要configuration本地的azure存储帐户。 我试图用连接string作为: <add key="AZURE_STORAGE_ACCOUNT" value="DevStorage"/> <add key="AZURE_STORAGE_ACCESS_KEY" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/> 可以通过不在代码中的azure存储模拟器来连接Azure存储。 任何人都可以得到我的解决scheme?

如何使用nodejs在azure blob存储上设置contenttype

我有一个nodejs服务器,正在使用azure存储模块,并试图将一个wavfile upload到azure blob存储。 我试图将blob上的contentType设置为“audio / wav”,但它在存储中显示为“application / octet-stream”。 代码是: upload: function (id, buffer, mimeType, callback) { self = this; var size = buffer.length; var stream = streamifier.createReadStream(buffer); var options = { contentType: 'audio/wav' }; self.blobService.createBlockBlobFromStream(self.containerName, id, stream, size, options, function (error, result, response) { if (error) { callback(error); } callback(null); }); } 任何想法,我做错了什么?

使用node.js在Azure文件存储中上传文件

我们正在尝试创build一个web服务,使用node.js服务将file upload到Azure文件存储。 以下是node.js服务器代码。 exports.post = function(request, response){ var shareName = request.headers.sharename; var dirPath = request.headers.directorypath; var fileName = request.headers.filename; var body; var length; request.on("data", function(chunk){ body += chunk; console.log("Get data"); }); request.on("end", function(){ try{ console.log("end"); var data = body; length = data.length; console.log(body); // This giving the result as undefined console.log(length); fileService.createFileFromStream(shareName, dirPath, fileName, body, […]