I'm using the Azure Blob Storage node library: https://github.com/Azure/azure-storage-node
I've referred to this documentation: https://github.com/Azure/azure-content/blob/master/articles/storage-nodejs-how-to-use-blob-storage.md
I can do most blob operations just fine, but I'd like to list blobs that haven't been modified in a week. The documentation is pretty light but there appears to be an access condition I can use, I'm just not sure of the syntax. Here was my best guess:
var weekOld = new Date();
weekOld.setDate(weekOld.getDate() - 7);
var options = {accessConditions:{}};
options['accessConditions'][azure.BlobUtilities.AccessConditions.DATE_UNMODIFIED_SINCE] = weekOld;
blobSvc.listBlobsSegmentedWithPrefix('mycontainer', 'myprefix', null /*token*/, options, function(error, result, response){
if(!error){
result.entries.forEach(function(val, index, array){
console.log(val.name);
console.log(val.properties);
});
}
console.log(response);
});
This pulls in all the blobs with the right prefix but ignores the modification date. I'm taking a guess at the syntax of passing in accessConditions with my query so it's not surprising this isn't working. Any help is much appreciated.