-
Notifications
You must be signed in to change notification settings - Fork 4
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
CDN URL support missing #3
Comments
Have you tried if either of those settings work? If fog-rackspace doesn't have a way of setting a CDN URL, then we can do something similar what |
Thanks. I did try both of those settings in Had a quick look at the S3 adapter code you mentioned and the |
Looking at the If not, I will go ahead and implement a |
Actually, no, it seems |
That almost works, but passing just the domain to |
I pushed a2f22b8 to master that adds the |
Unfortunately that hasn't worked, getting the following in return from the
Where the Also would it be a pain to be able to set the CDN URL in the shrine storage initialiser, as I think it would probably be the most used case for it? Thanks! |
Oh, that means I would have to have provider-specific code in shrine-fog, because setting the CDN URL would have to know about Rackspace URL. I don't think that's the right way to go, the whole point of Fog is that you don't need to have provider-specific logic, so I would like to draw the line here (I don't want Shrine::Storage::Fog to turn into CarrierWave::Storarge::Fog). You should the probably make a feature request to the fog-rackspace gem. Alternatively you can create a helper method that modifies the Rackspace URLs to go through CDN. |
The Shrine convention is that URL modifiers are passed to the |
Hi, I'm revisiting this after upgrading to Shrine 3, and creating some derivations that now also need a public URL. It looks as though the S3 storage that ships with Shrine properly forwards the In the fog docs here: http://fog.io/storage/#sending-it-out it seems as though Any chance we could re-open this one? I could possibly work on a pull request for this? Thanks! |
Thanks, feel free to send a PR 👍 |
Just had a bit of time to pick this up again. The tests need a fair bit of work to accomodate the differences in the providers, so I was just looking to get some feedback if you had a moment. What I have been considering are: 1. My Test Refactoring
2. Abandon ShipI don't want to do all this just to add a bunch of maintenance burden to your library unless the benefit of having it outweighs that, so happy to close this issue and just continue overwriting the methods I need, if you don't think it's worth it. You would obviously have a much better idea of the value of supporting Fog more generally outside of AWS. With more hosting providers supporting S3 APIs and the |
I know very little about Fog, to be honest, and haven't used it in production. If you would like to make some fixes, I will happily give you commit access and gem push access. In this case just let me know what is your RubyGems.org email address. |
Yeah, no worries. Honestly, unless more coverage is going to benefit others it's not doing well on the cost/benefit front. That said, I'm happy to be added as committer (and same username on rubygems as here), I can then add more test coverage when I have the spare time. And if someone else sees this issue, and replies here, that will be much more of a motivator. |
Hi,
I'm trying to use this gem with
fog-rackspace 0.1.5
and uploads are working, but then all the files are referencing the API endpointhttp://storage101.syd2.clouddrive.com/v1/MossoCloudFS_922621/
as the base URL when usingattachment_url
method on the model, which isn't a publicly accessible path, instead of something public.Carrierwave uses an independent config called
asset_host
to generate public URLs, and fog-rackspace has the options:rackspace_storage_url
and:rackspace_cdn_url
, but not sure if those are accessible/which one would be ideal for this use case?It looks from the following code lines I think that the URL generation is using the API endpoint path, not something public?
shrine-fog/lib/shrine/storage/fog.rb
Lines 38 to 48 in b053ade
Sorry for explaining that terribly.
The text was updated successfully, but these errors were encountered: