search for: file_system

Displaying 20 results from an estimated 39 matches for "file_system".

Did you mean: file_systems
2007 Dec 13
0
acts_as_attachment -> attachment_fu, db_system -> file_system
Hi I currently have an app running with acts_as_attachment and db_system. I would like to convert it to attachment_fu and file_system. Has anyone done this? Are there any pitfalls? I am aware that the change from acts_as_attachment to attachment_fu is just a matter of replacing the plugins, but I am wondering about the switch from db_system to file_system. Is it as easy? Just fishing for pitfalls really. thanks ivor --~--~---...
2009 Apr 21
3
attachment_fu giving problem on production
...working fine on Local(development) system but giving problem on production. Basically on production the attachment_fu is not able to generate thumbnail image it saving the original size image. Below is the configuration. has_attachment :content_type => :image, :storage => :file_system, :max_size => 500.kilobytes, :thumbnails => {:thumb => ''170x60>''}, :processor => ''Rmagick'', :path_prefix => ''public/store_images'' Is any idea what can be an i...
2009 Jul 24
1
Attachment_fu - watermark tmp file before saved to S3
...saved'' method but this would be too late, and a ''before_thumbnail_saved'' but this is no good because it''s for thumbnails. I think I need ''before_attachment_saved'' or the equivalent in the attachment workflow. I do have a watermark working for :file_system storage option using the code below. # -------------------------------------------- watermark on file_system after initial save - but doesn''t work for s3 def after_attachment_saved unless self.thumbnail? dst = Magick::Image.read("#{RAILS_ROOT}/public/# {self.publi...
2007 Sep 18
2
Making attachment_fu polymorphic
...them up for polymorphism. Add to the table a column called path_prefix. ## (I used: belongs_to :attachable, :polymorphic => true for the model and attachable_type and ## attachable_id for the table); and configure the Attachment_fu model with ## has_attachment :storage => :file_system ## include Attachment_kung ## Make sure Attachment_kung is *last*, or you will not be able to display your attachments. Also, ## I have not tested Attachment_kung with :storage => :s3 or :storage => :db_system. I *ought* to ## work, but one never knows until one tries....
2010 Dec 21
0
liquid include error please help
...ing code working for almost 4 days and glad if you could help me. Basically what I want to do is to use liquid ''include'' tag I''m getting this error Liquid error: No such template ''test'' my code is as follows in my app/views/page/index.erb <% file_system = Liquid::LocalFileSystem.new("/page/") full_file_path = file_system.full_path("test") Liquid::Template.file_system = Liquid::LocalFileSystem.new(full_file_path) %> <%@template = Liquid::Template.parse(@page) %> <%= raw @template.render(@liquid_snippets) %&g...
2007 Sep 25
2
attachment_fu default path
...anything (with "attachment_fu default path") that could help me in changing attachment_fu''s default path. My model: [audio.rb] has_attachment :max_size => 20.megabytes has_attachment :content_type => "audio/mpeg" has_attachment :storage => :file_system has_attachment :path_prefix => "public/files [/audio.rb] But all my files go on been uploaded to public/files/0000/00[last inserted id]/my_file_name.ext. What am I missing? I want that all my files go to public/files. Thank you very much amd sorry my poor english. -- Davi Vidal -...
2007 Apr 27
3
attachment_fu content_type problem
...ere is the document model class Document < ActiveRecord::Base belongs_to :tournament, :polymorphic => true has_attachment :content_type => [''application/pdf'', ''application/ msword'', ''text/plain''], :storage => :file_system, :max_size => 1.megabyte validates_as_attachment end --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk...
2007 Apr 21
3
attachment_fu thumbnails
...ed a parent_id column. now I get the following error when I trie to add a photo: undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for Photo:Class my code is: class Photo < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 1.megabyte, :thumbnails => { :thumb => ''164x164>'' } end create_table :photos do |t| t.column :filename, :string t.column :posted_on, :datetime t.column :description, :text t.column :name, :string end def create @pho...
2007 Mar 28
3
attachment_fu Not Resizing
...topped resizing images for me. I''m puzzled because before today it was resizing them and I don''t know what''s changed. Here''s my code: class Product < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 18.megabytes, :resize_to => ''300x'', :thumbnails => { :thumb => ''61x110!'' } validates_as_attachment end I expected a 420x595 image to be resized to 300xWhatever and a 61x1...
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2019 Mar 27
2
Re: [PATCH nbdkit v4 01/15] server: Implement extents/can_extents calls for plugins and filters.
...ufficient), then return C<-1>. > + > +=head3 Extents list > + > +The plugin C<extents> callback is passed an opaque pointer C<struct > +nbdkit_extents *extents>. This structure represents a list of > +L<filesystem extents|https://en.wikipedia.org/wiki/Extent_(file_systems)> > +describing which areas of the disk are allocated, which are sparse > +(“holes”), and, if supported, which are zeroes. > + > +The C<extents> callback should scan the disk starting at C<offset> and > +call C<nbdkit_add_extent> for each extent found. > + &g...
2006 Sep 08
4
Does acts_as_attachment :storage => :db_system work?
...but I don''t see how my model table hooks up with the db_files table so I am having trouble altering the image_tag from the tutorial (http://weblog.techno-weenie.net/articles/acts_as_attachment) so that it pulls data from the database. (Everything works fine if I want to use :storage => :file_system) How are my generated model and db_files connected? and what do I need in my show action to send the image to the browser? I tried code like this: send_data @picture.data_file.data, :filename => @picture.filename, :type => @picture.content_type, :dispo\ sition => ''inline'...
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
...< ActiveRecord::Base has_attachment :content_type => :image, #Allow standard image formats :path_prefix => ''public/photos'', #Where to store the uploaded images (shouldn''t need this) :storage => :file_system, #Store files in the filesystem :max_size => 1.megabyte, #Maximum image size, 1Mb :thumbnails => {:thumb => ''120x90''} #Create one thumbnail 120x90 validates_as_attachment end In my Product model, I...
2007 May 05
0
acts_as_attachment - no thumbnails?
...39; is always NULL rmagick-1.15.6 is freshly installed. I have the :thumbnails stuff setup per http://weblog.techno-weenie.net/articles/acts_as_attachment/thumbnailing using a model like this: class EventPic < ActiveRecord::Base belongs_to :event acts_as_attachment :storage => :file_system, :max_size => 900.kilobytes, :content_type => :image, :thumbnails => { :normal => ''800>'', :thumb => ''150x150'' } validates_as_attachment end and a controller something like: .... @event = current_user.events.find(params[:id]) (1...
2007 Dec 02
0
attachment_fu doesn't generate thumbnails on windows
...The result is I can upload the original image ok but still no thumbnails are generated and the only row in my mugshots table is for the original image. My Mugshot class looks like class Mugshot < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :processor => ''Rmagick'', :max_size => 6.megabytes, :resize_to => ''100x100>'', :thumbnails => { :thumb => ''30x30>'', :tiny => ''10x10>''...
2008 Nov 26
0
Best Configuration for attachment fu (images)
...particular I''ll like to know which is the best resizing option and the best "thumbnail" size for large images. This is my current configuration. When I resize strictly to 640x480 the image loses its original ratio. has_attachment :content_type => :image, :storage => :file_system, :max_size => 4096.kilobytes, :resize_to => ''640x480'', :thumbnails => { :thumb => ''32x32'', :medium => ''96x96'', :large => ''320x240''}, :processor => :ImageScience . Thanks, Elías --~--~-...
2009 Jul 30
4
attachment_fu + :path_prefix
Hello friends, I have a query like I am using a attchment_fu to store images. But the i don''t want to store to the default path let say :path_prefix => ''public/uploads'' i want a dyname path for e.g :path_prefix => ''public/#{ current_user.id}'', So just wanted to know how can i say images to the dynamic location. Regards Abhishek Shukla
2008 Sep 29
1
has_one :through with :source. How to alias association?
...ng models: class Attachment < ActiveRecord::Base has_attachment :content_type => [:image, ''application/pdf''], :max_size => 3.megabytes, :path_prefix => ''../private/attachments'', :storage => :file_system, :processor => :rmagick, :thumbnails => { :small => ''32x32'', :medium => ''64x64'', :large => ''256x256'' } validates_as_attachment belongs_to :attachable, :polymorphic => true end class M...
2006 Apr 07
0
How to interpret the output of 'iostat -x /dev/sdb1 20 100' ??
...is it NONE, or sector, or something else? If it is NONE, then does it mean that the unit is 'read request'? 4th question: (await + svctm) is the time span for a read request from being dispatched (by kernel driver) to being served? If so, could we use this number as a criteria for (disk + file_system) performance ? 5th question: %util is which percentage of CPU time? it looks too abstract in manual, does it means (disk I/O opertions time) divided by (%user + %nice + %sys)? Or it is (%user + %nice + %sys) divided by all the system time lots (%user + %nice + %sys +%idle)? I got lost completely...
2019 Mar 27
0
Re: [PATCH nbdkit v4 01/15] server: Implement extents/can_extents calls for plugins and filters.
...1>. > > + > > +=head3 Extents list > > + > > +The plugin C<extents> callback is passed an opaque pointer C<struct > > +nbdkit_extents *extents>. This structure represents a list of > > +L<filesystem extents|https://en.wikipedia.org/wiki/Extent_(file_systems)> > > +describing which areas of the disk are allocated, which are sparse > > +(“holes”), and, if supported, which are zeroes. > > + > > +The C<extents> callback should scan the disk starting at C<offset> and > > +call C<nbdkit_add_extent> for eac...