Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Colin Law
d do not >> > open in >> > browser. So I want to upload as it is. >> >> Which version are you using? >> >> Colin >> >> > >> > Thanks. >> > >> > On Tuesday, March 15, 2016 at 2:08:28 PM UTC+5:30, Colin Law wrote: >> >

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Walter Lee Davis
> On Mar 15, 2016, at 7:38 AM, Walter Lee Davis <wa...@wdstudio.com> wrote: > >> >> On Mar 15, 2016, at 4:28 AM, Nilesh <navale.nil...@gmail.com> wrote: >> >> Currently I am working on a ROR code which uses rails paperclip gem. >> >>

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Walter Lee Davis
> On Mar 15, 2016, at 4:28 AM, Nilesh <navale.nil...@gmail.com> wrote: > > Currently I am working on a ROR code which uses rails paperclip gem. > > > > My requirement is, to process images as per its file extension. Here's how I solved this for a document ma

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Nilesh
upload as it is. >> >> Which version are you using? >> >> Colin >> >> > >> > Thanks. >> > >> > On Tuesday, March 15, 2016 at 2:08:28 PM UTC+5:30, Colin Law wrote: >> >> >> >>

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Nilesh
r. So I want to upload as it is. > > Which version are you using? > > Colin > > > > > Thanks. > > > > On Tuesday, March 15, 2016 at 2:08:28 PM UTC+5:30, Colin Law wrote: > >> > >> On 15 March 2016 at 08:28, Nilesh <navale...@gmail.com&

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Colin Law
it is. Which version are you using? Colin > > Thanks. > > On Tuesday, March 15, 2016 at 2:08:28 PM UTC+5:30, Colin Law wrote: >> >> On 15 March 2016 at 08:28, Nilesh <navale...@gmail.com> wrote: >> > Currently I am working on a ROR code which uses rails paperc

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Nilesh
On 15 March 2016 at 08:28, Nilesh <navale...@gmail.com > > wrote: > > Currently I am working on a ROR code which uses rails paperclip gem. > > > > > > My requirement is, to process images as per its file extension. > > > > > > Case 1: I

Re: [Rails] Need help with Rails paperclip gem

2016-03-15 Thread Colin Law
On 15 March 2016 at 08:28, Nilesh <navale.nil...@gmail.com> wrote: > Currently I am working on a ROR code which uses rails paperclip gem. > > > My requirement is, to process images as per its file extension. > > > Case 1: If image type is “svg”, then do not process orig

[Rails] Need help with Rails paperclip gem

2016-03-15 Thread Nilesh
Currently I am working on a ROR code which uses rails paperclip gem. My requirement is, to process images as per its file extension. Case 1: If image type is “svg”, then do not process original image(as ImageMagick breaks on resizing svg images). Upload original image, along with large

Re: [Rails] Paperclip + ImageMagick help needed

2016-02-11 Thread Colin Law
On 11 February 2016 at 03:08, Walter Lee Davis wrote: > ... > In order to do this (no matter which file attachment system you choose) you > will need to refactor your application slightly. You need a model instance > *per* image uploaded, so the usual way to do this is with

Re: [Rails] Paperclip + ImageMagick help needed

2016-02-11 Thread Walter Lee Davis
> On Feb 10, 2016, at 10:34 PM, Alexis Marie wrote: > > Hey Walter. Thanks for all of the help! > > I went through all of your steps. What should I write on my view page? > > > > If you want to show all the images for a listing, the simplest thing is: <%-

Re: [Rails] Paperclip + ImageMagick help needed

2016-02-10 Thread Walter Lee Davis
> On Feb 10, 2016, at 6:52 PM, Alexis Marie wrote: > > Hey there, I want to be able to upload multiple images at once on my > website. I can only upload one image at a time at the moment. Can > anybody lead me in the right direction? Here's my code > > > > > > >

[Rails] Paperclip + ImageMagick help needed

2016-02-10 Thread Alexis Marie
Hey there, I want to be able to upload multiple images at once on my website. I can only upload one image at a time at the moment. Can anybody lead me in the right direction? Here's my code /app/models/listing.rb class Listing < ActiveRecord::Base has_attached_file :image, :styles => {

[Rails] Paperclip temp files eating my server!

2015-10-12 Thread Walter Lee Davis
I am using the Rails console to move some files from one site to another. Inside a loop, I use the technique* advised in the Paperclip wiki to set the remote_url of the attachment to the correct URL, and then call save on the model, which copies the file over and runs it through the various

[Rails] Paperclip + Fog + S3 +Digital Certificate

2015-03-11 Thread Cezinha Anjos
Hi! I'm doing the following: The user, through my app, is uploading his digital certificate to the S3 using Fog + Paperclip. Until here I have no doubt in my process. My problem begins when I need to use this certificate into the Rails. I found two ways of doing: 1. Using the paperclip's

[Rails] Paperclip-av-transcoder gem not generating thumbnails from videos

2015-01-09 Thread Alex S.
Hi, I am trying to upload videos in my Rails application using the gem Paperclip-av-transcoder. The videos are being uploaded to my application successfully but the thumbnails are not being generated. Here's my code:- has_attached_file :movie, :url =

[Rails] Paperclip

2014-04-05 Thread Alfredo Barrero
Good afternoon everyone. Im using the gem Paperclip in order to upload the images of the users to my server. But I having problems with it. I don't know how to resize the image size after uploading the image. I'm using CSS to try to change the size but is not working. I think Paperclip is

Re: [Rails] Paperclip

2014-04-05 Thread Walther Diechmann
Good morning Alfredo ;) file sizes: Paperclip will post process (resize) your images - if all validations are ok - otherwise post processing will not commence. Paperclip supports an extensible selection of post-processors. When you define a set of styles for an attachment, by default it is

Re: [Rails] Paperclip

2014-04-05 Thread Tommaso Visconti
Hi Alfredo, both your questions are answered in the README of the github project: https://github.com/thoughtbot/paperclip The sizes can be choosed with the :styles param of the `has_attached_file` method (in the model): has_attached_file :avatar, :styles = { :medium = 300x300, :thumb = 100x100 }

Re: [Rails] Paperclip

2014-04-05 Thread Walter Lee Davis
On Apr 5, 2014, at 7:46 AM, Alfredo Barrero wrote: Hi there, I've been problems using this line: %= image_tag @user.avatar.url(:medium) % When I use that line, in the browser I just can see text instead of the picture. And RubyMine does not recognize avatar. If I use this line the

[Rails] Paperclip with nested form saving null values in db

2013-10-04 Thread ruby rails
I have a Attachment model and Reminder model. The Reminder has many attachments and Attachment belongs to a Reminder. I have set up the association and it works fine. I have defined accepts_nested_attributes_for :attachments in the Reminder model also. I have a nested form where there is multiple

[Rails] paperclip

2013-09-06 Thread Avi
Hello, how to save paperclip image to s3 without any model? Is it possible? I need to save image to s3 directly inside a method without saving it in database. How can I do that? Thanks in advance, Avinash -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Paperclip s3 copy image

2013-08-07 Thread Avi
*Hello All,* I have an image in paperclip s3 amazon bucket. I want to copy that image save it into another model. But I also want to create a new image with another name. how can I achieve it? Example:- I have an image name a.png in s3 bucket in a model named sample.rb. I have to take the

Re: [Rails] Paperclip s3 copy image

2013-08-07 Thread Walter Lee Davis
On Aug 7, 2013, at 5:59 AM, Avi wrote: Hello All, I have an image in paperclip s3 amazon bucket. I want to copy that image save it into another model. But I also want to create a new image with another name. how can I achieve it? Example:- I have an image name a.png in s3 bucket

[Rails] paperclip aws-s3

2013-07-27 Thread Annapoorna R
hello, Please could anybody help me with this error i get this error after i click upload (pdf)button using ubuntu rails 3.2.13, ruby 1.9.3 paperclip with aws s3 storage settings. Errno::ENOENT in CandidatesController#create No such file or directory - getaddrinfo -- You received this message

[Rails] Paperclip thumbnail generation uses magic?

2013-06-12 Thread Walter Lee Davis
I have been using CarrierWave for file uploads on a site which needs to accept a really wide range of different movie formats, stills, PDFs... And I have been struggling with making thumbnails of certain formats. After much yak-shaving with ffmpeg and imagemagick and Rmagick, I finally decided

Re: [Rails] Paperclip thumbnail generation uses magic?

2013-06-12 Thread Jim Ruther Nill
I haven't seen the paperclip code but I think you can look at the preprocessors used by default by paperclip. You usually see logs when paperclip does some processing using rmagick which may be a clue as to what part of the lib you want to look at. On Wed, Jun 12, 2013 at 11:15 PM, Walter Lee

Re: [Rails] Paperclip thumbnail generation uses magic?

2013-06-12 Thread Jason Fleetwood-Boldt
you may want to put this into something that loads when you app loads, like initializers/paperclip.rb Paperclip.options[:log] = true On Jun 12, 2013, at 11:58 AM, Jim Ruther Nill wrote: I haven't seen the paperclip code but I think you can look at the preprocessors used by default by

Re: [Rails] Paperclip thumbnail generation uses magic?

2013-06-12 Thread Walter Lee Davis
Thanks, that's good advice. The console told the tale. It appears as though ImageMagick is delegating to ffmpeg, and the convert function that Paperclip generates in their thumbnail operation tacks a [0] to the end of the filename to get it to use the first frame. I need to do some more

[Rails] paperclip rotate image

2013-02-07 Thread Saravanan P
Hello everyone, I am using paperclip for storing images. I need to store images in two way in one model, One: Original image with some styles which I defined. Second: Rotated original image and some other style which I defined. Is this possible to do? If yes please advise how can i achieve.

Re: [Rails] paperclip rotate image

2013-02-07 Thread Dheeraj Kumar
If you're using paperclip, just add some post-processors. https://github.com/thoughtbot/paperclip#post-processing -- Dheeraj Kumar On Thursday 7 February 2013 at 6:26 PM, Saravanan P wrote: Hello everyone, I am using paperclip for storing images. I need to store images in two way in

[Rails] Paperclip installed / commands recognized / still not working

2012-10-18 Thread Bruno Siqueira
Helo, Guys. I'm testing a system in production server and I'm having a problem with Paperclip. Image's upload works properly, when paperclip processes the image, it generates the following output in the production.log: Started PUT /profiles/2?locale=pt-BR for 139.82.24.217 at 2012-10-17

Re: [Rails] paperclip gem question.

2012-10-07 Thread BalaRaju Vankala
Hi... 1. in Gemfile add this gem gem paperclip, 3.1.4 2. bundle install 3.after creating model add below code in migration file(db-migrate-photo model migration file ) t.attachment:photo 4. rake db:migrate 5. in your model Add this code attr_accessible: photo has_attached_file :photo

[Rails] paperclip gem question.

2012-10-06 Thread roelof
Hello, I decided that I use paperclip to handle my images. I have this model for posts class Micropost ActiveRecord::Base attr_accessible :content, :user_id belongs_to :user end So according to the manual I have to do this : has_attached_file :photo But :photo is never used anywhere.

[Rails] Paperclip images are not stored in my directory

2012-08-17 Thread Maddy
It is my User.rb model, My images are not stored in my assets directory.. has_attached_file :photo, :styles = { :small = 100x100#, :large = 500x500, :thumb = 60x60 }, :url = /assets/users/:id/:style/:basename.:extension, :path =

[Rails] Paperclip duplicates uploaded images

2012-07-11 Thread yaniv pr
Hi, I'm using rails3 with paperclip to upload multiple images as in http://www.emersonlackey.com/article/paperclip-with-rails-3 The problem is, every image is duplicated upon create/update, that is, saved twice to the db (and afterwards displayed twice in the view as a result) In other pages,

[Rails] Paperclip preserve files ?

2012-01-25 Thread Venkat Surabhi
Hi, I am using paperclip to upload files. The problem I am facing is, based on my object property I need to preserve my file. Means my object should be deleted from db but the file need to be restored. I am using the option :preserve_files = true. If I keep the above option in

[Rails] Paperclip

2012-01-13 Thread Karthikeyan
Hello people, I installed paperclip gem with these following lines in gem file gem 'rmagick' gem paperclip, ~ 2.0 gem 'aws-s3' I am using amazon S3. the problem came when I ran the migration which had the following migration code class AddImageColumnsToPicture ActiveRecord::Migration def

Re: [Rails] Paperclip

2012-01-13 Thread Walter Lee Davis
On Jan 13, 2012, at 4:44 AM, Karthikeyan wrote: Hello people, I installed paperclip gem with these following lines in gem file gem 'rmagick' gem paperclip, ~ 2.0 gem 'aws-s3' I am using amazon S3. the problem came when I ran the migration which had the following migration code

Re: [Rails] Paperclip

2012-01-13 Thread Jordan Miller
did you add the definitions and functions to your model file? jordan On Jan 13, 2012, at 9:27 AM, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 13, 2012, at 4:44 AM, Karthikeyan wrote: Hello people, I installed paperclip gem with these following lines in gem file gem 'rmagick'

[Rails] paperclip content_type error

2011-09-25 Thread Aashish Kiran
Hi all, I am using rails 3.1 with paperclip. when I try to upload a picture of type 'jpeg'. picture_content_type value not a image/jpeg. It is storing some Xadsfdsfdasfc value. I dont get the problem. can you help me. thanks, Aashish -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Paperclip saving/retrieving files above public/

2011-09-10 Thread Keith Raymond
Hello all, I'm quite baffled/agitated by this. I'm using paperclip to allow upload of images to my application. This is working fine, it's saving the the images exactly where its supposed to and it's saving the image objects as its supposed to. The problem is that I can't display these images

[Rails] Paperclip nested resources problem

2011-08-22 Thread Remco Swoany
My models: class Country ActiveRecord::Base has_many :regions has_many :assets, :dependent = :destroy accepts_nested_attributes_for :assets end class Region ActiveRecord::Base belongs_to :country has_many :appartments has_many :assets, :dependent = :destroy

[Rails] Paperclip - could not find generator.

2011-08-13 Thread Manny 777
Hello there, I installed plugin paperclip for working with images, but after running a command -- rails generate paperclip user avatar I am getting error -- Could not find generator paperclip. If I will try run a command -- bundle show paperclip So I will get --

Re: [Rails] Paperclip - could not find generator.

2011-08-13 Thread Walter Lee Davis
On Aug 13, 2011, at 3:29 AM, Manny 777 wrote: Hello there, I installed plugin paperclip for working with images, but after running a command -- rails generate paperclip user avatar I am getting error -- Could not find generator paperclip. If I will try run a command -- bundle show

[Rails] Paperclip Amazon S3 Europe

2011-06-16 Thread johnnybutler7
Hi, Im looking to move my file storage to Amazon S3 europe and have followed both these solutions here http://thewebfellas.com/blog/2010/1/31/paperclip-vs-amazon-s3-european-buckets using the aws-s3 gem and the qooba/s3 gem. Everything looks fine up to when i try to save the file. Ive stepped

[Rails] Paperclip Gem Successfully Installed? If yes its doesn't seem to detect via IRB..

2011-05-19 Thread Mohnish J.
Hi, I am trying to install a paperclip gem using the command `gem install paperclip-2.2.0.gem` . This doesn't work for me.. it keeps giving me the error.. mohnish@mohnish-desktop:~/Downloads/Important_backups/new_gems/paperclip$ gem install paperclip-2.2.0.gem ERROR: While executing

[Rails] paperclip

2011-05-10 Thread julio sampaio
Estou tendo problemas com o plugin paperclip numa aplicação que criei só para testa o plugin da a seguinte mensagem quando inicio o servidor ! undefined method `has_attached_file 'for # Class:0x473f598 Meu model esta assim, se eu comenta ele a aplicação roda.Já instalei esss plugin umas 20

[Rails] paperclip plugin

2011-04-27 Thread Mlle
Hi, Is it possible to have a file uploader in my form using the paperclip plugin that doesn't correspond to a model attribute? For example, I want to be able to upload a file for a model but name it using the model's id - then when I retrieve the file, I'll just use the id to get the file's

[Rails] Paperclip validates_attachment_content_type not working?

2011-03-17 Thread mattyh88
Hi, I'm using the paperclip gem to upload photos. I'm trying to use the content-type validator in my photo-model but it's not working. Photo upload with just the file-size validator works. What could this be? Here's my code: http://pastebin.com/1nGfgmtN Thanks, Mathew -- You received this

[Rails] paperclip unit files created during tests left on system

2011-02-15 Thread Conor
I have a rails 3.0.3 app that uses paperclip (2.3.8) to store files on s3 using the s3 gem. In my units tests I'm using the local file system and I have noticed that the files are left on the system after the tests have run. Looking at the logs I could see that the destroy method was never called

[Rails] Paperclip custom Interpolation in url

2011-01-07 Thread skt
Folks, I have a simple model hierarchy (reduced to example as below) class Post ActiveRecord::Base has_many :comments end class Comment ActiveRecord::Base belongs_to :post has_attached_file :photo, # :url = /assets/class_cal/original post

[Rails] Paperclip polymorphic styles

2010-12-27 Thread Greg Ma
Hi, I have a polymorphic Image model that I am using on 2 very different models. I would like to have different image styles depending on the model. I have been searching everwhere for an answer but I haven't be able to find something. Does someone knows has to do that? GReg -- Posted via

[Rails] paperclip Image Versioning

2010-11-01 Thread CuriousNewbie
Hello. I'm hoping to hear your recommendations on using paperclip for images with versioning. Anyone know of any elegant paper_clip image, versioning implementation solutions? Thank you -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

Re: [Rails] paperclip Image Versioning

2010-11-01 Thread Walter Lee Davis
Not elegant, but I did manage to get Paperclip to stop deleting or overwriting the previous versions' attachments (I am using vestal_versions here for that part). The path I took was to patch attachment.rb and storage.rb from Paperclip. In attachment, I look to see if the instance was

[Rails] Paperclip: numbers strings after filename

2010-10-23 Thread Ryo
Hi, I'm trying to instantiate the file from the saved file via paperclip. The codes to open the file is: barcodeFile = open(scan.barcode.url,r) ..but getting error of file not found as the url is extended as /system/barcodes/1/small/barcode.png?1284296856 with the number

[Rails] rails PaperClip / S3 / ImageMagick

2010-10-23 Thread nobosh
I'm using paperclip in my rails 3 app to upload photos, resize with ImageMagick and then post to S3. For the life of me, I can't figure out why this process is s slow on my localhost? Even without any resizing it's crazy slow... 30+ seconds for one photo? And my network cpu aren't even

[Rails] Re: rails PaperClip / S3 / ImageMagick

2010-10-23 Thread nobosh
after watching the development log, it seems to be pretty quick on everything expect the original file, since is only 29kb JPG? taking about 9 secs. On Oct 23, 6:27 pm, nobosh bhellm...@gmail.com wrote: I'm using paperclip in my rails 3 app to upload photos, resize with ImageMagick and then

Re: [Rails] Paperclip style not working with proc

2010-10-11 Thread Walter Lee Davis
What are you trying to accomplish here? What do you want the form to send to Paperclip, or what do you want Paperclip to send to your model? Walter On Oct 7, 2010, at 3:16 AM, Christian Fazzini wrote: I have a stream_type field on my form. When the form submits, instance.stream_type is

Re: [Rails] Paperclip style not working with proc

2010-10-11 Thread radhames brito
Your main problem ( and i apologise since i havent have time do make the demo i promise you) is that you are fixed into doing this thing with processors which make everything more ortodox but also a bit harder, i for example do every with filters in my models and i just pass commands to the shell

[Rails] Paperclip style not working with proc

2010-10-07 Thread Christian Fazzini
I have a stream_type field on my form. When the form submits, instance.stream_type is blank. To verify this, in my custom processor (class ProcessAudio Processor), I do puts options[:geometry]. has_attached_file :media, :styles = { :original = Proc.new { |instance|

[Rails] Paperclip not executing FFMPEG properly

2010-10-01 Thread Christian Fazzini
Im using a customs processor to run ffmpeg on a video to create a thumbnail. So far so good. Except when I do: cmd = -i #...@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv success = Paperclip.run('ffmpeg', cmd) Console is reporting: ffmpeg '-i

Re: [Rails] Paperclip not executing FFMPEG properly

2010-10-01 Thread radhames brito
On Fri, Oct 1, 2010 at 9:38 AM, Christian Fazzini christian.fazz...@gmail.com wrote: Im using a customs processor to run ffmpeg on a video to create a thumbnail. this here is how i do it def create_thumbnail jpg = File.join(File.dirname(vidfile.path), #{id}.jpg) File.open(jpg,

[Rails] Re: Rails + Paperclip + IE: pictures disappear!

2010-09-23 Thread apneadiving
I've found the pb... IE is definitely crappy the pictures with problems weren't encoded in RGB (despite the jpg extension)... Thanks to GIMP, I converted it, everything is fine now! On Sep 22, 11:31 pm, apneadiving apnea.diving.d...@gmail.com wrote: Hi Radhames, Thanks for your advice,

[Rails] Re: Rails + Paperclip + IE: pictures disappear!

2010-09-23 Thread apneadiving
I've found the pb... IE is definitely crappy the pictures with problems weren't encoded in RGB (despite the jpg extension)... Thanks to GIMP, I converted it, everything is fine now! On Sep 22, 11:31 pm, apneadiving apnea.diving.d...@gmail.com wrote: Hi Radhames, Thanks for your advice,

Re: [Rails] Rails + Paperclip + IE: pictures disappear!

2010-09-22 Thread radhames brito
try removing all the styling and see if the images are visible. Other than a possible problem with styling the only thing i notice was that bandwidth appear to be low and IE is so crappy it could be timing out. if that is the case use javascript to delay the loading of the big flash in the middle

[Rails] Re: Rails + Paperclip + IE: pictures disappear!

2010-09-22 Thread apneadiving
Hi Radhames, Thanks for your advice, I'll try this once I've a PC available, but I'm not sure this is the perfect track: the same pics are always missing. I tried to access these with their URL without success, or more precisely IE displays a cross. If ever I enter a bad URL (trying to access a

[Rails] Rails + Paperclip + IE: pictures disappear!

2010-09-21 Thread apneadiving
Hi, I'm a bit confused with the problem I discovered: Some of the pictures I upload aren't displayed on IE. Some of them are ok, some of them aren't. Yet, they are the same kind of pics and they are side by side... Everything works fine in chrome, safari and firefox. The example is here:

[Rails] Paperclip - helppppp

2010-09-13 Thread daze
I keep seeing this error when I try to upload an image: -- 2 errors prohibited this panel from being saved There were problems with the following fields: Image C:/Users/Family/AppData/Local/Temp/stream,10032,0.png is not recognized by the 'identify' command. Image

[Rails] Paperclip - 'identify' command.

2010-09-10 Thread Abder-Rahman Ali
I'm following this tutorial: http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/ When it comes to running the application, I get the following errors: -Photo C:/Users/ABDER-~1/AppData/Local/Temp/stream,2396,0.jpg is not recognized by the 'identify' command. -Photo

[Rails] PaperClip StorageMethodNotFound (Cannot found filesystem)

2010-08-31 Thread ashu
Hello , i have an issue with paperclip . when i a working on windows its works fine when i Go on Fedora Or heroku It gives Error PaperClip StorageMethodNotFound (Cannot found filesystem) : . . .

[Rails] paperclip gem install failed

2010-08-30 Thread nirosh
when i'm installing paperclip gem its return err (i18n requires RubyGems version = 1.3.6) the os is ubuntu 10.04 64bit -nirosh- -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Paperclip not saving images

2010-08-23 Thread Kaspir Ghost
Hi, rails newb here. I'm trying to make a photo album app with rails. I'm using paperclip, because I need to upload multiple images at the same time. But when I upload a picture, paperclip isn't saving it. I'm not getting any errors, it just doesn't save it. I've gone through multiple tutorials

[Rails] Paperclip - possible to modify file and load file content as string?

2010-08-22 Thread David Kahn
Wanted to see if anyone knows of a way - or the preferred way - to do these three tasks with Paperclip: 1) Access the content of an uploaded file before save. I did find that the following works before save, but is there a clearer way to do this:

[Rails] paperclip -background process

2010-08-16 Thread Sean Six
I have found that it takes about 40-50 seconds from my home computer to upload a file to my website. I have been looking around at various blogs, regarding background processing with paperclip, but it seems all of them involve doing only the image conversion in the background. Here is an

[Rails] Paperclip generating crap urls on server, works on dev

2010-08-11 Thread Fernando Perez
Hi, I have the following: has_attached_file :data, :styles = {:theora = {:format = ogv}, :still = {:format = jpg}, :small = {:format = jpg}}, :url= /uploads/products/:basename:suffix.:extension, :path = :rails_root/uploads/products/:basename:suffix.:extension Let's say I upload a

[Rails] Paperclip, id partition, and renaming images

2010-08-10 Thread Jeremy Woertink
I'm using paperclip in this Rails 2.3.8 project. What I'm looking to do is rename all the images so they fit the :url = /assets/:class/:id_partition/:attachment/:style.:extension from my model. I had about 30,000 records for this model and when changing to start using the :id_partition, I changed

[Rails] Paperclip - Amazon S3 - https

2010-08-09 Thread Sandy
I am able to use Paperclip to save files to Amazon's S3 storage. Once saved, the files are available using a URL associated with the bucket and filename. I have not been able to find a good tutorial which clearly explains how to save a file to S3 (using Paperclip) whereby it can only be

Re: [Rails] Paperclip - Amazon S3 - https

2010-08-09 Thread Daniel Alejandro Gaytán Valencia
Take a look at: http://scottmotte.com/archives/181.html Regards, Daniel Gaytán http://survey.richapplabs.com/index.php?sid=62661lang=en 2010/8/9 Sandy sandy.as...@gmail.com I am able to use Paperclip to save files to Amazon's S3 storage. Once saved, the files are available using a URL

[Rails] paperclip save to disk and s3

2010-08-07 Thread Sean Six
I have a standard Paperclip setup that saves a file to my disk. In addition I would also like the file saved to my amazon s3 bucket. [code] after_save :copy_to_s3 def copy_to_s3 has_attached_file :photo, :storage = :s3, :s3_credentials = #{RAILS_ROOT}/config/s3.yml, :styles = {

Re: [Rails] paperclip save to disk and s3

2010-08-07 Thread Ivan Nastyukhin
Because it's in another scope of object And it's nothing give to u, it's one define some methods U can open paperclip source and find out how call upload to s3, or u can use aws-s3 gem, which simple, s3 is http based storage, simple http query, and all a done )) Sent from my iPad On Aug 8,

[Rails] Paperclip not finding imagemagick on prod, works on dev

2010-08-06 Thread Fernando Perez
Hi, I am using paperclip to attach documents to my models. it works perfectly on my dev machine, but on the server I get a CommandNotFoundError. On my server if I ./script/console I can run imagemagick through system(convert) and it works, so why can't paperclip find it? Thanks for your ideas

Re: [Rails] Paperclip not finding imagemagick on prod, works on dev

2010-08-06 Thread Hassan Schroeder
On Fri, Aug 6, 2010 at 11:26 AM, Fernando Perez li...@ruby-forum.com wrote: I am using paperclip to attach documents to my models. it works perfectly on my dev machine, but on the server I get a CommandNotFoundError. On my server if I ./script/console I can run imagemagick through

[Rails] Paperclip Trouble - Not Writing to the Database

2010-08-06 Thread A. Leek
Hello all, I'm a Rails newbie trying to get a basic implementation of Paperclip up but it's giving me problems. I'm developing on Windows XP (I know...) with WEBrick and MySQL. In my model I have: class User ActiveRecord::Base has_attached_file :avatar,:styles = { :medium = 300x300, :thumb =

[Rails] paperclip, authlogic and callback issue

2010-07-27 Thread badnaam
I use authlogic for authentication and paperclip for handling user's profile picture attachments. I use the following method to get the current_user def current_user_session return @current_user_session if defined? (@current_user_session) @current_user_session =

[Rails] Paperclip polymorfic problem with :styles

2010-07-08 Thread Dries
I made a model Picture that is polymorfic but I want to specify specific :styles for each model that use Picture. http://pastie.org/1034662 I don't know how to this, I used lambda for this but he doesn't know the data.instance.picturable on submit. It returns always nil. -- You received this

Re: [Rails] Paperclip polymorfic problem with :styles

2010-07-08 Thread Philip Hallstrom
I made a model Picture that is polymorfic but I want to specify specific :styles for each model that use Picture. http://pastie.org/1034662 I don't know how to this, I used lambda for this but he doesn't know the data.instance.picturable on submit. It returns always nil. My memory is

[Rails] Paperclip polymorphic styles problem

2010-07-07 Thread Dries Steenhouwer
I made my model Picture polymorphic and this model use paperclip. Now I want to specify :styles for the model that have many pictures, but I can't find a solution to fix this. At the moment I use this and all is working good : http://pastie.org/1034105 But for example for model Brand I need

[Rails] Paperclip/ImageMagick issue

2010-06-08 Thread Jeremy Woertink
I'm using paperclip for uploading images, and I'm running into a weird error: 2 errors prohibited this billboard from being saved There were problems with the following fields: * Image /var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not recognized by the 'identify'

Re: [Rails] Paperclip/ImageMagick issue

2010-06-08 Thread Philip Hallstrom
Is JPG support compiled into Imagemagick? If you run identify directly on your image does it work? Or complain? On Jun 8, 2010, at 9:25 AM, Jeremy Woertink wrote: I'm using paperclip for uploading images, and I'm running into a weird error: 2 errors prohibited this billboard from being

Re: [Rails] Paperclip/ImageMagick issue

2010-06-08 Thread catz
Paperclip.options[:image_magick_path] = /opt/local/bin Paperclip.options[:command_path] = /opt/local/bin add something like these two commands to paperclip.rb in initializers folder just point to right identify command path On 6/8/10, Philip Hallstrom phi...@pjkh.com wrote: Is JPG support

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-19 Thread Peter De Berdt
On 19 May 2010, at 00:08, Philip Hallstrom wrote: Good to know. That won't help with the authenticity token though... Indeed, our swfuploads are completely separated into reusable Javascript objects, so I didn't think of it anymore. Note to self: don't answer mailing list replies while

[Rails] Rails, Paperclip and SWFupload ...

2010-05-18 Thread Ruby on Rails: Talk
Hi I'm sure this is in the wrong group - so any suggestions for a right group would be great! And you have my express permission to treat me like an idiot in replies! I have a fair amount of knowledge ... but ... obviously not enough to understand this past the basics! I have two problems ...

[Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Ruby on Rails: Talk
Hi I solved it ... but have no idea why! Needed to change: self.file = data to self.photo = data And it works ... h ... On May 18, 7:10 pm, Ruby on Rails: Talk dazzaroo...@gmail.com wrote: Hi I'm sure this is in the wrong group - so any suggestions for a right group would be great!

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Philip Hallstrom
On May 18, 2010, at 11:41 AM, Ruby on Rails: Talk wrote: Hi I solved it ... but have no idea why! Needed to change: self.file = data to self.photo = data And it works ... h ... Because your Photo model has_attached_file :photo, ... *NOT* has_attached_file :file, ...

Re: [Rails] Rails, Paperclip and SWFupload ...

2010-05-18 Thread Philip Hallstrom
On May 18, 2010, at 11:10 AM, Ruby on Rails: Talk wrote: Hi I'm sure this is in the wrong group - so any suggestions for a right group would be great! And you have my express permission to treat me like an idiot in replies! I have a fair amount of knowledge ... but ... obviously not

[Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Ruby on Rails: Talk
Thanks so much for you help with the problem and the suggestion with new version of swfupload! I don't suppose you have any clear insight into why I can't get the InvalidAuthorizationToken thing to work do you? Thanks once again for help already given and any more you might be able to offer

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Philip Hallstrom
Thanks so much for you help with the problem and the suggestion with new version of swfupload! I don't suppose you have any clear insight into why I can't get the InvalidAuthorizationToken thing to work do you? My guess is you're not passing it along via Flash. See this bit in

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Peter De Berdt
On 18 May 2010, at 21:40, Philip Hallstrom wrote: My guess is you're not passing it along via Flash. See this bit in app/views/home/index.html.erb where I invoke the swfupload object. See where it's passing the session key and the authenticity token? That's important. And also why you

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-18 Thread Philip Hallstrom
My guess is you're not passing it along via Flash. See this bit in app/views/home/index.html.erb where I invoke the swfupload object. See where it's passing the session key and the authenticity token? That's important. And also why you need that middleware stuff.

  1   2   >