similar to: Serving image files from filesystem

Displaying 20 results from an estimated 30000 matches similar to: "Serving image files from filesystem"

2010 Aug 18
0
paper clip plugin validation fails
hallo friends i developpeda photo uploader using paper clip plugin its working quite well , but one problem is its able to upload all kinds of file. see i want only png,gif,jpeg and should show error message if validation fails.here if i applied validations in the model the result is errors like this ArgumentError (too few arguments): app/controllers/images_controller.rb:63:in
2006 Jun 06
8
How do I wrap a <%= link to %> around an image?
I''ve got a bunch of dynamically generated link paths that I want to use to link some dynamically-generated image paths. Specifically, I want to link thumbnails in a gallery to the larger images. But I''m stymied by Rails'' syntax. I can''t figure out how to do this. I tried this: <%= link_to(image_tag("../../images/photos/photo.photogroup/TN_
2006 Jun 14
1
file column validates_format_of
Been manually testing file column with success except it seems to upload the file before validating it. Also .pdf files (which shouldn''t even validate) crash WEBrick. What am I missing to solve these problems? (apart from a brain!) validates_presence_of :title, :file validates_format_of :file, :with => %r{.(gif|jpg|png)$}i, :message => "File must end with .jpg, .gif or
2006 Feb 03
0
component/ajax variable access problem
I''m trying to embed a little image gallery on each page. The photos need to be different for each page. I just want to use ajax and let them click on the photo and have it show the next image. When the page loads, it shows the correct image. But when clicking on it, it gives an error because it doesn''t know what @images is anymore. On the view for the home page: <div
2007 Apr 27
3
Image upload problem.
I''ve seen posts of a few people who have this problem, but not a single response about solving it. I can''t upload .png files, but .jpg and .gif work fine. When I upload just a .png, my action gets a StringIO object which breaks when I try to copy the upload to an absolute location. However, using multiple-field upload, as long as one of the to-upload files is *not* a .png, all
2007 Dec 27
4
validates_file_format_of only when is there an image
i have a model with this: file_column :image validates_file_format_of :image, :in => ["gif", "png", "jpg"] If inthe form the user not insert the image i receive an error. If i remove: validates_file_format_of :image, :in => ["gif", "png", "jpg"] it works. Is possible do the validation only when user insert the image in form? i
2006 May 11
0
File upload works with webrick, but fails in lighttpd 1.4.11
I''ve been trying to add a basic file upload feature (just based on the Rails Recipes example), but I find that it only works with the webrick server and not my lighttpd 1.4.11 server. I''m running Rails 1.1.2 on OSX. The upload silently fails with both firefox and Safari, even with the useragent hack and with any size of file/image. My lighttpd config is pretty standard as
2006 May 31
0
validates_format error
How does validate work? Is the file uploaded before the format is checked? I tried uploading a pdf and it crashed the WEBrick. Out putting this over and over: **** Warning: Fonts with Subtype = /TrueType should be embedded. But BookmanOldStyle is not embedded. Surely the file should have been rejected before it is even uploaded? Model: class Image < ActiveRecord::Base belongs_to :user
2013 Jun 15
0
Freight forwarder & logistics provider shared an album with you.
Dear My Friend Nice day, Hyun Young is a leading professional freight forwarder and logistics provider who focus on the shipment from South China to all the world. Hyun Young started freight forwarding operation at Shenzhen in 2004. Based at Shenzhen, our ambition have pushed us forward to expand to other cities in south of China. Now we have capacity of handing shipment to or from all
2006 Feb 07
4
Can''t stop/start lighttpd
Hello everyone, I?ve been working with Ruby on Rails for about 2 months now and have really enjoyed the ease of use of it. I?m only been doing development on it so I?ve been using WeBrick. Recently, I have built a server running Debian Linux, with ruby 1.8.2, rails 1.0.0, lighty 1.4.3, and Mysql 5.0.18. I used WeBrick to generate a lighttpd.conf file for me, I changed the paths in the
2006 Jan 09
1
Question about image storage and relative paths
I''m writing a website with a feature that hosts images that people upload. Right now, relative paths works within on my Windows box. So specifically, I''m able to call File.open on "public/images/somefile.jpg" and Rails/WEBrick understands that the path is relative to the home directory of the project. This means that "public/images/somefile.jpg" ends up
2006 Mar 16
0
problem with file_column storing images and other files
I have a model called ProductFiles which associates an arbitrary amount of image and documents with a product. I am using the file_column plugin to manage the upload and storage of the images, like so: class ProductFile < ActiveRecord::Base # Accepted MIME types, mime types that are not part of this list are rejected MIME_EXTENSIONS = { "image/gif" => "gif",
2019 Jun 21
1
support free WEBP images in Opus files
Oops, meant to add, there's absolutely no restrictions on the format of any picture block, either, and opusenc will already just add whatever gets passed in without even trying to verify anything about the file format. That's up to tagging and playback software to support; foobar2000, for instance, only supports formats that are part of Windows' GDIplus library. On Fri, Jun 21, 2019
2005 Jul 22
2
Unpredictable behavoir using Sortable javascript
Hey all, I''m attempting create a photo album that can be re-ordered using the great scipts from script.aculo.us <http://script.aculo.us>. It seems to work as expected when I pretty much copy and paste the puzzle example but when I try and be a bit trickier (changing the movable elements to be divs containing images) things get wierd. I''m able to "pick" the
2007 Feb 15
1
Images and stylesheets are not serving
Hello One of ours sites has just lost all it''s images and styling. It''s not a very busy site at all, so it might have been not working properly for some time now. Here''s how we start it in Lighty <pre> $HTTP["host"] == "gregynog.glam.ac.uk" { server.document-root = "/www/rails/greg/current/public/" server.error-handler-404 =
2005 Dec 28
3
problems with lighty on linux
I''m trying to get our app running on Lighty... I followed Ezra''s instructions: http://brainspl.at/pages/rails_stack... Currently the app runs fine with webrick, but with lighty I get 404 errors on everything. I found if I don''t edit the lighttpd.conf file to use absolute paths, it works fine. But this is not good for production because I need to run it with the -d
2005 Nov 16
0
image conversion w/ file column
hey I''m trying to find a way to convert images that were uploaded using file_column *before* file_column generates a thumb and copies them to the final dir - this because 50x50 is pretty small and png would be a much better format (in smaller dimensions) than jpg or gif. This is what i have in my model (using rmagick for the conversion): file_column :image, :magick => {:versions
2007 Nov 18
14
css image url''s and :img problem
Hi, i have this controller class to serve static files. It works well for the stylesheet file under a /static directory, locating it, but the images referenced in the stylesheet do not appear. They are in the same /static folder, next to the stylesheet.css file. link :rel => ''stylesheet'', :href => R(Static, ''stylesheet.css''), :type =>
2007 Mar 24
4
image file URL generated by image_tag include some parameter
I''m using image_tag to generate img tag. URL of image file generated by image_tag include a parameter like following. "http:// ..... /images/filename.gif?123123123" What''s this number parameter for? How can I remove it? I''m using rails with built-in WEBrick server in test mode. --~--~---------~--~----~------------~-------~--~----~ You received this message
2019 Jun 21
3
support free WEBP images in Opus files
WebP (imagepart of VP9) is better then JPG AVIF (imagepart of VPX/AV1) is better then HEIF please support in OPUS file for album arts more then JPG and PNG... WebP and AVIF are free imageformats can store multiple images thats good for the problem with METADATA_BLOCK_PICTURE only can store one file. i try to push some devs of player and converter to support this too. wbr from berlin