In the Rackspace web panel, you can set individual pre-defined headers on objects in Cloud Files. For example, "Access-Control-Allow-Origin', "Access-Control-Max-Age", etc.
It appears there is no way to set these via pkgcloud. If I do:
myFile.metadata['Access-Control-Allow-Origin'] = '*';
rackspace.updateFileMetadata(myContainer, myFile, function(err, file) { myFile = file;});
it fails to update, because of this line
If I do rackspace.OBJECT_META_PREFIX = '' and call updateFileMetadata again, then the new header properly gets set and is visible in the Cloud Files panel.
Is there another method I'm missing for doing updates to headers without the OBJECT_META_PREFIX automatically added, or for now do I have to be careful and override that value with an empty string?
In the Rackspace web panel, you can set individual pre-defined headers on objects in Cloud Files. For example, "Access-Control-Allow-Origin', "Access-Control-Max-Age", etc.
It appears there is no way to set these via
pkgcloud. If I do:it fails to update, because of this line
If I do
rackspace.OBJECT_META_PREFIX = ''and callupdateFileMetadataagain, then the new header properly gets set and is visible in the Cloud Files panel.Is there another method I'm missing for doing updates to headers without the
OBJECT_META_PREFIXautomatically added, or for now do I have to be careful and override that value with an empty string?