chmouel / upcs

Upload to OpenStack Swift with curl easily
62 stars 13 forks source link

Add Delete-After support #14

Closed EmilienM closed 11 years ago

EmilienM commented 11 years ago

We could add a new flag for auto-delete the file after some time. In my patch, the file is not auto-deleted by default.

To delete the file after 1 day : upcs ... -t 86400

chmouel commented 11 years ago

nice one. i didn't test it but if X-Delete-After: is empty, nothing happen right?

EmilienM commented 11 years ago

If it's empty, X-Delete-After is absent when you do a swift stat . That's why I say in the help section that if you let it empty, the object will never expire.

EmilienM commented 11 years ago

Actually, this is not X-Delete-After that you should see in swift stat but X-Delete-At, and I confirm that you don't see X-Delete-At if you set an empty value for X-Delete-After.