carrierware, few questions.

38 views
Skip to first unread message

Claudio Poli

unread,
Nov 27, 2009, 1:05:57 AM11/27/09
to carrierwave
hi,
I'm currently testing this gem on AR and looks good so far, however
I'm lost under some points.

- when using s3 storage and filename override like "#{model.uuid}.mp3"
in our uploader it works but only for the final file that is on s3,
instead the only thing I see in db's table column is a ".mp3". uuid is
there upon initialize.

- I specified cname support and my acls :authenticated_read for amazon
s3, I'm using aws-s3 as gem. when retrieving urls for those uploaded
objects it lacks entirely Amazon API code such as Signature to
securely retrieve the file.
What's the correct way to specify a custom expiration on url? As far I
know amazon should support cnamed authenticated links.

- I need to grab other properties of the file, such as size, mime
type, etc. what's the best way to handle this in CarrierWave? I'm
asking since I saw some methods to do just that, or if I should do
this operations manually, where is best?

- Lastly, currently I'm using Paperclip with filesystem storage, and
then later move the files to s3 through a queue.
I read about a cache storage and a permanente storage in CarrierWave,
but there are no example on how to use this funcionality, can you
provide an example, please?

thanks for your attention,

kain

Claudio Poli

unread,
Nov 27, 2009, 1:13:16 AM11/27/09
to carrierwave
to quote myself on the first point, I was using a wrong callback, now
the filename is properly set.

Jonas Nicklas

unread,
Nov 27, 2009, 3:10:14 AM11/27/09
to carri...@googlegroups.com
1) Does that mean I can close the issue on GitHub?

2) Currently CarrierWave doesn't generate authenticated URLs, so your
file won't be read. This should actually be fairly easy to implement,
I just haven't had a need for it yet. I'll welcome a patch, of course!
Fom what I understand however, the AWS-S3 library does not support
cnamed buckets at all, so it probably can't generate authenticated
URLs for them.

3) CarrierWave includes no mechanism for doing this (unlike
Paperclip), you're gonna have to do it yourself. This is a conscious
design decision I made to make it easier to write fully working
database adapters for ORMs other than ActiveRecord.

4) Haven't really needed to queue out uploads yet, but it's something
I'd definitely like to make easier. I wrote down this pastie with a
basic idea of how it might work, haven't actually tried it though:
http://pastie.org/716901

Hope that helps,

/Jonas

Claudio Poli

unread,
Nov 27, 2009, 3:14:00 AM11/27/09
to carrierwave
On 27 Nov, 09:10, Jonas Nicklas <jonas.nick...@gmail.com> wrote:
> 1) Does that mean I can close the issue on GitHub?

yes, definitely

> 2) Currently CarrierWave doesn't generate authenticated URLs, so your
> file won't be read. This should actually be fairly easy to implement,
> I just haven't had a need for it yet. I'll welcome a patch, of course!
> Fom what I understand however, the AWS-S3 library does not support
> cnamed buckets at all, so it probably can't generate authenticated
> URLs for them.

I see, I tried patching aws-s3 *a lot* of times but can't get those
damn signatures to work with cnames.

> 3) CarrierWave includes no mechanism for doing this (unlike
> Paperclip), you're gonna have to do it yourself. This is a conscious
> design decision I made to make it easier to write fully working
> database adapters for ORMs other than ActiveRecord.

allright, I understand

> 4) Haven't really needed to queue out uploads yet, but it's something
> I'd definitely like to make easier. I wrote down this pastie with a
> basic idea of how it might work, haven't actually tried it though:http://pastie.org/716901

thanks, will take a look at it

> Hope that helps,

sure did,
thanks for your support,

kain
Reply all
Reply to author
Forward
0 new messages