geemus
14p7 comments posted · 0 followers · following 0
61 weeks ago @ Union Station - Virtualize This - Inst... · 0 replies · +2 points
61 weeks ago @ Union Station - Getting Hired: fog Edi... · 0 replies · +1 points
Performance wise I haven't done a direct comparison to AWS::S3 recently, but when I last did fog was comparable or better in nearly every case.
fog is mostly geared toward doing either String or File bodies for uploads. But if ActionDispatch::Http::UploadedFile instances will return true with is_a?(File) then it should just work. I don't happen to know off hand if this is the case or not. If it ends up that they don't work correctly we can work to remedy the situation.
As for renaming I think you are just stuck with copy/delete. It would be nice to do it all at once but to the best of my knowledge that is not an operation that s3 provides.
61 weeks ago @ Union Station - Getting Hired: fog Edi... · 0 replies · +1 points
62 weeks ago @ Union Station - Getting Hired: fog Edi... · 0 replies · +1 points
eu-west-1 is a more direct reference to the endpoint url that it uses for that location constraint. You can see the endpoints here: http://docs.amazonwebservices.com/AmazonS3/latest...
If you want to create a bucket specifically in eu you should still use 'EU' as the location for it. So you would probably use 'eu-west-1' to make the connection but then do something like:
storage.directories.new(:key => 'foobarbaz', :public => true, :location => 'EU')
I would suggest trying to start from a clean slate and see if you can get the workflow to work. So either delete the bucket you were testing with before, or choose a new name to try. Then make sure that the region of the connection and the region set for the bucket agree (setting neither would default to us-east, which is maybe easiest). Once you've gotten that to work you can try again with EU and a new bucket and hopefully get the same results. If that still isn't working out for you let me know though (I'm trying to finish getting a big presentation together for tomorrow so I don't really have time to dig in too much but I wanted to try to provide some ideas for you). So if you are still stuck let me know and I'll try again (just maybe not until tomorrow after the presentation). Thanks!
62 weeks ago @ Union Station - Getting Hired: fog Edi... · 0 replies · +2 points
First off, sorry about the key thing. I did it correctly in my extended example (https://gist.github.com/710869) but I guess the wires got crossed when I was trying to add all that stuff into the blog post. You can see which parameters are required and recognized(optional) for aws storage here: https://gist.github.com/710869 (sorry it isn't proper documentation at present, but better than nothing).
If you pass :region => 'eu-west-1' it should create a connection to europe for you that should otherwise work as normal. Otherwise many requests will automatically follow redirects to do things in Europe where necessary.
I'm not sure outside that why you would have sporadic errors related to saving files. One thing to note is that when you use files.new it simply makes a local representation. It requires calling save in order to actually persist the file, similarly you can use files.create to do new+save in one step. Outside that if something is going wrong on amazon's side I would expect an error to be raised.
I hope that helps clear some of that up for you. If not please follow up (if you can provide an example of how you are using it that can often help me clear things up much quicker). I'm glad you like the idea of fog and I am sorry that the process of getting started can still be a bit rocky. I have been doing my best to improve it but I know I still have a ways to go. Let me know if there is anything more I can help clear up for you in the mean time. Thanks!
66 weeks ago @ Union Station - The Curious Tale of th... · 0 replies · +1 points
120 weeks ago @ Union Station - The Art of Library · 0 replies · +1 points
Opus