Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fog::Storage::AWS::File#save deprecation warning without alternative #226

Closed
mcfadden opened this issue Feb 12, 2016 · 1 comment
Closed

Comments

@mcfadden
Copy link

I'm trying to update the storage_class on items in S3. In the documentation the only way I've been able to find a way to do this is via the save method on a File object. Apart from being a terribly inefficient way to accomplish this, it throws a deprecation warning that isn't particularly helpful in this case:

options param is deprecated, use acl= instead

Since I'm not setting the ACL, this doesn't actually help me.

I guess that leaves be with a multi-part question:

  1. Is there a better way to be updating the storage class on items?

  2. Is the entire options param deprecated or is it really just the acl option that is deprecated?

@geemus
Copy link
Member

geemus commented Feb 19, 2016

  1. Hey, looks like AWS recommends using the copy object request for this purpose (http://docs.aws.amazon.com/AmazonS3/latest/dev/ChgStoClsOfObj.html). So I think you could use the copy(target_directory, target_key, options) and just pass the current directory/key as well as the storage options as the 3rd argument.
  2. I believe only acl is actually intended to be deprecated there and it was made overly broad on accident (I suspect we didn't realize there were other options that were used there, it should probably look just for the ACL key in the conditional, would happily accept a patch).

Hope that helps, I'm going to close since I think this should resolve, but let me know if you have further questions or concerns.

Thanks!
wes

@geemus geemus closed this as completed Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants