使用 MS Azure Node sdk,我正在尝试更改一个文件的缓存属性。这有效,从带有节点的命令行运行:
var azure = require('azure');
var containerName = '2013-07-10-r49';
var blobName = 'index.html';
var blobService = azure.createBlobService();
blobService.setBlobProperties(containerName,blobName,{cacheControlHeader: 'xxxxx'},function(err,setResponse)
{
console.log('test');
});
这是一个独立的节点任务。但在 Grunt 中,这不起作用:
grunt.registerMultiTask('setAzureProperty','Mainly used to update cache value for index.html', function()
{
var azure = require('azure');
var containerName = '2013-07-10-r49';
var blobName = 'index.html';
var blobService = azure.createBlobService();
blobService.setBlobProperties(containerName,blobName,{cacheControlHeader: 'xxxxxx'},function(err,setResponse)
{
var inspect = require('eyes').inspector();
inspect(setResponse);
});
});
有什么建议么。它只是默默地什么都不做。