c# - How To Remove File After certain period from RackSpace Cloud using Asp.Net? -


i using 'net.openstack.providers.rackspace' create object , save file cloud.

i want delete newly uploaded file after 30 days rackspace cloud automatically.

i have searched lot , found 'x-delete-after' metadata can used. not able how implement same.

i using following code create object :

cloudfilesprovider cloudfilesprovider = getcloudfilesytemobject(); cloudfilesprovider.createobject(strcontainer, fupuploadstream, filename); 

please me regarding automatic deletion cloud. thanks

finally found solution, here code same

cloudfilesprovider cloudfilesprovider = getcloudfilesytemobject(); dictionary<string, string> dicmetadata = new dictionary<string,string>(); dicmetadata.add("x-delete-after", "2592000"); cloudfilesprovider.createobject(strcontainer, fupuploadstream, filename, headers: dicmetadata); 

here '2592000(seconds)' equal 30 days.

this code adds header file 'x-delete-at' self calculation of date time of file deleted.

now after time want delete able delete file content , file self not deleted.

i searching same , trying contact rackspace cloud.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -