search for: howtouploadfiles

Displaying 20 results from an estimated 21 matches for "howtouploadfiles".

2006 Apr 10
3
File Upload Problems
following the instructions at http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles, I am able to upload to an explicit and existing directory (i.e. c:\ror\app\public\images\photo.jpg). However, when I try to upload to a folder that does not exist, say, c:\ror\app\public\image\newfolder\photo.jpg, I get the following error: Errno::ENOENT in Images#create No such file or direc...
2005 Mar 10
6
images from database + caching
Is the information in http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles on caching images still the best way on how to cache images that are served from the database? I haven''t added time information to my image table yet, and the images are sent after every single page view (even if it''s been downloaded already). Joe
2006 Aug 02
3
Upload forms--where is the file object?
Hi All, I''ve been trying to create an upload form page that will take an uploaded file, and save it to a directory on the server. I''ve tried following a couple of posts on this list, and the HowTo from here: http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles Here is the code in my view: <%= start_form_tag ( {:action => "upload"}, { :mulipart => true } ) %> <%= file_field_tag("file") %> <%= submit_tag "Upload" %> <%= end_form_tag % > Seems simple enough, But the problem is the object being...
2006 Jun 07
1
Upload to DB hang mentioned in wiki
I''m uploading files to a mysql database, using a mediumblob size. Following the wiki here: http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles , I got past the first mysql 500kb limitation with the max_allowed_packet = xM trick, setting it to 1000M. However, as the person at the very bottom of the wiki notes, I too cannot upload more than around 10mb. I also tried the suggested workaround: <%= hidden_field ''value'', ...
2005 Mar 08
3
Extracting images from a DB
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I would like to extract an image BLOB from my database and display it alongside some other information on my ''edit'' page. I read the information here http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles and that was really helpful. However, it still isn''t clear to me how I would get access to the image in my views if I use send_data. My naive reading of send_data is that you get a page with only the image on it. Hopefully I just misunderstand something here, because the next option in m...
2006 May 04
5
How to upload only jpeg & gif & png images into public/images using rubyonrails
Hello iam new to rubyonrails. Please any one help me out in "How to upload only jpeg & gif & png images into public/images using rubyonrails" Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/33a17ad2/attachment.html
2006 Aug 01
3
Upload file to file system and sql insert date errors
I''m trying to use one form to upload a file to the file system and insert a title and description field into the database. I have no problem uploading files to the file system using the code from http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles There are more fields on the form than need to be inserted into the database, name and file. I need to pull out these extra fields before I can insert them into the database. My last effort was to try and use a sql statement in the model, but have not got that to work yet. Any pointers? Thank...
2006 Jun 26
4
Missing Content-Length header with lighttpd
We have our rails application running using lighttpd and everything seems fine with Firefox, but when the client is Explorer some media doesn''t get transferred from the server correctly. With Webrick, Content-Length is set when a request is made for an mp3 file. Using Firefox with lighttpd, Transfer-Encoding is set to chunked, so the Content-Length field isn''t required.
2006 Jun 27
2
Serve an image up from an action
What I am really trying to do is use the file_column plugin for the file uplaod/storage (to a non-application directory), but serve up the images on my own (without the mage_tag url_for_file_column technique) In the java world, I would simply do something like this: <img src="myImageServlet?id=1"> and myImageServlet would simply return the appropriate mime headers and data
2006 May 04
0
File upload directly to DB
I''ve created file upload functionality based on the wiki HowtoUploadFiles. I''m in development mode running the newest version of rails and ruby. I''m using the development WEBRICK web server. The database is MySQL 4.1. I''ve updated the max_allowed_packet setting=32M. The problem is that file uploads get stuck at sizes of 8mb or greater. Si...
2006 Apr 07
1
Upload corrupts images. Any ideas why?
Hi, I have written upload action and it seems to be working in general but image files consistently get corrupted. They differ in both content and size. I have uploaded a small text file without any problems. Everything is running on my laptop, WEBrick is the server. Code: *********** begin @filename = @params[''NewFile''].original_filename
2006 Apr 19
1
How to save the uploaded file
Hi, Can anyone tell me how to save the uploaded file and what are all the steps that are required in this process.As of now i am able to get the uploaded file name and saving it to the database.But while i am trying to retrieve it i am not able to do that because i am not saving the image to file system. Thanks, Chandra. -- Posted via http://www.ruby-forum.com/.
2006 Feb 14
1
Does Mysql can store image?
I use Ruby on Rails with mysql. customer need to upload image to webserver, can i store the image into mysql? how to? thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Feb 25
0
Simple file upload help
I''m trying to implement the simple file upload example at http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles However, I''m getting an error "No such file or directory" when I submit the form... Errno::ENOENT in Admin/websites#create No such file or directory - /images/websites/websitename.jpg I believe it''s relating to the code in the model: def self.save(website) File.o...
2005 May 07
0
Displaying images from PostgreSQL large objects
I''ve got a bunch of images stored in a pgsql database as large objects. Currently I use a PHP script to display the images, but I''d like to do it in Rails. I followed the example of sending files/data at http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles but all the images that get sent are corrupted, apparently. Do I need to do something different because it''s a large object? Here''s the snippet of code that should send the image: def showimage @thumb = Thumbnail.find_by_item_id_and_size(@params[''id''], '&...
2006 Apr 17
8
file upload
...easy, it kind of bugs me that I''d have to create two columns in my table to support the ability to upload a file... if I have to do this, then I will, but I was curious if there is any easy way to do this. The only possibility I found was here: http://wiki.rubyonrails.com/rails/pages/HowtoUploadFiles However, there were a couple of things I wasn''t sure on: 1. in the view: <input type="file" name="person[picture]" /> What is [picture] a reference to? this isn''t being stored in the database... is it just so we can access it with the person class?...
2006 Jul 25
1
newbie--how do i load a parsed file?
Hello there, I''m new with ruby on rails and i don''t know how to load up a parsed file into my database. I have my ruby script that parses it but don''t know where to put my code, or how to combine it with view/model/controller. this is what i have: class Description < ActiveRecord::Base def import_strings(a_file) table = { }
2006 Apr 26
6
Immediate help needed
I have posted this previously also but haven''t received any help. So, if somebody could look into it and guide.. I want to validate the extension of files that I am uploading. Like I want only the doc/pdf files to be uploaded.. Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 May 07
5
File upload/database import
I have been using Ruby on Rails for around 6 weeks now (so far I love it), but I''ve gotten to a point in the application where I need to allow the user to upload comma deliminated text files that will get loaded into one of the database tables. Before I get started doing this, I was wondering anyone knows of any examples or tutorials that deal with this. I''d rather do it
2006 Aug 08
1
File upload into Mysql (using lighttpd) problem
...39;t found anything that looks like a solution. I''m using mysql 4.1. All my tables are InnoDB. I''m running lighttpd for the web server. There is something on this page about FastCGI not liking file sizes of a certain kind. (Very bottom) http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles It says to change the param, IPCCommTimeout, to a higher amount. But he''s using Apache, and I''m using lighttpd. (I don''t see the equivalent setting in the lighttpd.conf file. http://www.lighttpd.net/documentation/fastcgi.html#options) I tried changing the, "idle...