node.js - How to query Azure Blobs by modification date using azure-storage-node -


i'm using azure blob storage node library: https://github.com/azure/azure-storage-node

i've referred documentation: https://github.com/azure/azure-content/blob/master/articles/storage-nodejs-how-to-use-blob-storage.md

i can blob operations fine, i'd list blobs haven't been modified in week. documentation pretty light there appears access condition can use, i'm not sure of syntax. here 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 blobs right prefix ignores modification date. i'm taking guess @ syntax of passing in accessconditions query it's not surprising isn't working. appreciated.

it not possible have server side filtering on blobs using access conditions while listing blobs because list blobs rest api operation doesn't support conditional headers. operations supporting conditional headers, please see specifying conditional headers blob service operations (section titled: operations supporting conditional headers).

your best option list blobs , filtering on client side.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -