I'm using Rackspace Cloud Files (Openstack Swift) in Java application, and have the following scenario: I upload files to a container (from web app, through my java rest backend) to a temporary location in rackspace container, and than, when some event happens (user confirms form saving), I need to move those files to a persistent location in that (the same) container.
I need those files to be downloaded then from my web app, so when uploading a file I specify header:
Content-Disposition=attachment;filename=thefilename.xxx
Also I specify header for files in my temporal storage X-Delete-At, so they could de automatically deleted if user doesn't save the form.
For copying file I use method from ObjectApi:
boolean copy(String destinationObject, String sourceContainer, String sourceObject)
It copies file content, file metadata, but doesn't copy Content-Disposition. It seems that there is no way to set it after copying.
The problem is that Cloud Files REST API allows to specify Content-Disposition header for copied target file, but Java API doesn't. I wonder if there a way to extend that API or call that service with required header somehow alternatively.