Does anyone feel an extension black list would be useful? #709

Closed
bokor opened this Issue Apr 18, 2012 · 12 comments

Projects

None yet

2 participants

@bokor
bokor commented Apr 18, 2012

The idea I had was to have an extension black list to eliminate files that you wouldn't want to have uploaded, Say like an .eml, .tmp, .jar, .zip file uploaded. I might try to add this if anyone thinks it is a great idea and would want to include it. Thanks!

@bensie
Member
bensie commented Apr 18, 2012

Yes please do! It's been requested a number of times in the past. Just open a new pull request when it's ready. Thanks!

@bensie bensie closed this Apr 18, 2012
@bokor
bokor commented Apr 22, 2012

Hey James. Is there anyway to unmount and remount an uploader. Wanted
to migrate data to a new model and then mount the uploader and
recreate versions.

Brian Bokor
Sent from my iPhone

On Apr 18, 2012, at 4:04 PM, James Miller
reply@reply.github.com
wrote:

Yes please do! It's been requested a number of times in the past. Just open a new pull request when it's ready. Thanks!


Reply to this email directly or view it on GitHub:
#709 (comment)

@bensie
Member
bensie commented Apr 23, 2012

No, nothing built-in. Why not just mount an uploader in each model?

@bokor
bokor commented Apr 23, 2012

I have put the mount on my model but I wanted to move my images from one model to another. I was hoping to move the image field (filename) from one field to the next without having the uploader then add the uploader and recreate_versions after that was done. If I do the following it won't migrate

mount_uploader :avatar, AvatarUploader

if I do the following it will move the field and I can reprocess all images. Thinking it might be a bug but not sure yet

mount_uploader :avatar, AvatarUploader, :mount_on => :image
@bokor
bokor commented Apr 23, 2012

Figured out what I needed for the migration

      photo = Photo.create(:attachable => object) #Polymorphic
      photo.write_uploader(:image, object.photo)
      photo.save!
@bokor
bokor commented Apr 28, 2012

James,

I'm working with Engine Yard and my environment has a App server, DB Server and Utility Server.  I would like to store cache files on the utility server.  Do you know how I might go about customizing Carrierwave to do this?  I'm really in a bad spot now and would appreciate any guidance on this...thank you so much!

Brian Bokor
Owner :: Designwaves, LLC
919-341-9583
http://www.designwaves.com

On Apr 18, 2012, at 4:04 PM, James Miller wrote:

Yes please do! It's been requested a number of times in the past. Just open a new pull request when it's ready. Thanks!


Reply to this email directly or view it on GitHub:
#709 (comment)

@bensie
Member
bensie commented Apr 28, 2012

I would recommend using S3 instead of storing them on a utility server. You could then setup a worker task of some kind that fetches them from S3 to the utility server.

Your app server receives the request -- CW can either store locally (:file) or on S3 (:fog).

@bokor
bokor commented Apr 28, 2012

Thanks...using S3 already but wanted to do background jobs for the processing and storing. Carrierwave-backgrounder works well but not for an environment like i have now. Can't access the files on the application server

@bensie
Member
bensie commented Apr 28, 2012

Assuming you're using S3 in the same region as your app servers, the time it takes to push the original straight to S3 is negligible in comparison to the time it takes to upload the file from client to app server. Then you can defer additional processing to the utility node(s).

@bokor
bokor commented Apr 28, 2012

Oh that might work. How would I defer the processing to the utility server for the additional processing? I think that is what I'm really trying to do.

@bensie
Member
bensie commented Apr 28, 2012

Just add a worker that calls MiniMagick/Rmagick directly and does whatever you need to do.

If you need further support, I recommend working with Engine Yard support or posting a question to Stack Overflow or to the CW Google Group.

@bokor
bokor commented Apr 28, 2012

James thank you so much! I really really appreciate you helping me on this. I'm working for a non-profit and really could use another developer or two. I'm trying to do so much myself and can't always get everything done myself. You have been more than helpful. Means a lot to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment