Apparently, I’ve earned the New User of the Month award, which I feel entitles me to ask another dumb question or two, so here goes!
My first ImageUploader has been working wonderfully (converting everything to Jpgs in the process), but now I’ve created a second uploader called LogoUploader for a new model where I don’t want to convert to jpgs, because I want to preserve the alpha channel background of PNG logos.
But even though I took the same steps to create my LogoUploader as I did the original ImageUploader, my new model just won’t use the settings of my LogoUploader. It still uses my original ImageUploader’s settings…
WHAT I’VE DONE
- My ‘logo_uploader.rb’ file is in the same Uploaders folder as my working ‘image_uploader.rb’ file
- My ‘logo_uploader.rb’ file declares its class correctly (“class LogoUploader < Shrine”)
- My new model includes the new LogoUploader properly (“include LogoUploader::Attachment(:logo)”)
- In my model’s form.file_field, I use “accept: LogoUploader::ALLOWED_TYPES.join(”,")" but it accepts the allowed types in my ImageUploader instead…
Anything else I should be doing to get this new Logo uploader working?? I guess I could just use the working ImageUploader, but use a Case block to define processing settings for each file format. Still, for the long-term, I would rather understand how to get a second uploader working properly.