similar to: File Uploding coding problems

Displaying 20 results from an estimated 50000 matches similar to: "File Uploding coding problems"

2006 Aug 15
8
AGAIN: file object treated as string
I am trying to implement the uploading of a file to a remote server I get error while trying to write the file on the server. The error I get is the following: undefined method `rewind'' for #<String:0x2aaaad062eb8> It seems to be treating my file as a string instead of a File object. --------- Code is below ------------------ VIEW: <%=
2006 Mar 18
2
Need help with my view populating rows
Hello, I was talking with someone in IRC, trying to get one form with however many fields to make new rows. He worked with me on the controller, but then I didn''t get the help with the view I needed, and I''ve been trying to do it on my own. I''m uploading pictures to my Pictures table. As you know, I need a few fields for each picture. I''ll need the filename,
2006 Jul 03
7
form_remote_tag with multipart/form-data
Does form_remote_tag supports multipart/form-data ? My form looks like this: <%= form_remote_tag :url => { :action => ''do_image_upload'' }, :html => { :enctype => ''multipart/form-data'' } %> <%= file_field ''image'', ''file_data'', :size => 32 %> <%= submit_tag
2011 Nov 03
1
Uploding package help
Hello All I want to upload a R package in CRAN. Kindly tell me how to upload a new package in CRAN REGARDS~ Reema Singh [[alternative HTML version deleted]]
2006 Apr 17
8
file upload
This is probably me having an issue with the mvc way of living.. .I''m used to perl/php scripting... I''ve got a photo blog I''m making... and in past iterations of this website, I''d just name the photos after the id of the entry. For instance: /photos/id.jpg /photos/id_thumb.jpg However, I''m having trouble finding an easy way to do this with rails.
2008 Jun 15
11
Ouch! Can't figure out this file upload issue...
Okay, so this is driving me crazy. I''m trying to do a file upload using code from a book. What happens: I get wrong number of arguments (1 for 0) in the upload controller save action. No idea why. Schema: The schema for the picture model object is just a textfield named comments and a binary field called data. Upload controller: def get @picture =Picture.new end def save
2006 Dec 17
1
file_column error: StringIO Instead of Temp_File
Hi all, i am using file_column to upload 3 images from the same form, they are all different names and DOM IDs so there isn''t a problem with the multiple upload. The problem is when i try to upload a file (or 2, or 3) sometimes it works, but sometimes i get this in the log file: "bar_image"=>{"file_temp"=>"",
2006 Feb 25
1
Safari File upload problem
Hello! I found your post to the rubyonrails.org about Safari File upload problem Did you able to solve this issue? > Has anyone else had problems uploading files with safari? > > Excerpt from my .rhtml: > > <form action="/photo/create?item_id=<%= @item.id %>" > method="post" enctype="multipart/form-data"> >
2006 Feb 08
1
Adding children via small subform
I''ve read AWDR and especially the part concerning adding child line_items to an order. Unfortunately I want to do my process in reverse and in doing what I thought would work I get a null object error when trying to append the children to the parent. This is a _major_ stumbling block in my Rails use as almost every one of my projects has needed this so its a pretty vital problem I need
2006 Jul 21
1
help appreciated on acts_as_taggable issue
Hi, I have added acts_as_taggable to one of my models called Picture, I then try to pick up some tags through the following code: user = User.find(session[:user_id]) photo = Picture.new (@params["picture"]) >> photo.tag(@params["picture_tags"]) << user.pictures << photo I''m trying to use the acts_as_taggable plugin, but I''m finding that
2006 Aug 15
0
file object treated as a string
I am trying to implement the uploading of a file to a remote server My upload form looks like this: <%= start_form_tag(:action => "save_image", :multipart => true) %> <td><b>Description</b> </td> <td><%= text_area("image", "descript", "cols" => 33, "rows" => 5) %></td>
2007 Aug 03
6
Problems saving an uploaded image to an app folder
In my app, the user can upload images. Rather than shoving the image data in the database, i want to put the filename and content type into the db, then rename the image with its record''s id number, and then save it into a local folder in my app folder. (hardcoded for now) All the details are being saved to the db ok, so as far as i know the "picture_file=" method is fine.
2006 Mar 13
6
lame newbie question: how to pass instance variables
This should be obvious - but I''m a long-time non-web app programmer and new to rails. I simply want to put something in a variable in one action and access it in another. It''s like this, I''m doing a simple photo gallery/managment app, and I have two actions in my picture_controller: The first one scans the picture directory and creates a new object in the pictures
2005 Sep 19
1
help with has_one relationship??
Hi I''m new to Rails and I''m struggling with a ''has-one'' relationship. I''m trying to save product and image data in seperate tables with one to one relationship. I''m assuming the problem lies in the controller method below but can''t work it out. The models contain the has_one and belongs to statements, and I tried swapping these
2007 Nov 20
3
How to rename image file before saving it using file_column?
Hello, I''m playing with the file_column plugin and I would like to rename the file when uploading it and before saving it to DB. I''ve tried it with before_create method in my model and also in the controller with the following code: @picture = Picture.new(params[:picture]) @picture.filename = ''newname'' Which doesn''t worked. How it could be done (if
2007 Nov 27
2
rendering this to the html page
hi guys, i have develop some coding like login forms and registration forms in normal ROR way. they are working 100% ok as i want. bt not i have created the html interface to my page and find dificult to add the ROR components that i have created to the newly design web interface. For a example. in the in my HTML file i have a allocate separate area(in the top right hand corner of the page.)
2006 Jan 09
1
Saving an upload
I am creating a database for movies (films) and television shows (shows) that will have has_and_belongs_to_many relationships with the pictures table. CREATE TABLE screenshots ( id serial NOT NULL, filename character varying NOT NULL, content_type character varying NOT NULL, primary key (id) ); CREATE TABLE films ( id serial NOT NULL, name character varying NOT NULL,
2013 Apr 24
3
join table naming
Hi, I’m an amateur learning rails and could use some help… I created a join table “pictures_questions” and append to it in the following way: @picture = Picture.new(params[:picture]) … if @picture.save @question.pictures << @picture Everything works fine but honestly I think I got this working by sheer luck and trial and error. I have 2 questions: 1. I do not understand the
2006 Jul 22
17
Problem getting form_remote_tag to work with image upload
Hey guys, I am trying to pass the parameters for the file being upload, but the params[] are not being passed. Ive read through some posts and realize this is an issue with RoR. I read through some of the posts and someone suggested using: http://svn.kylemaxwell.com/form_remote_upload/trunk/ I tried to install it, and although I thought I installed it correctly, it doesn''t work.
2006 Jun 28
2
Ajax - Upload File Upload
hello, i have a problem. I want to upload a file with ajax and the following tag: submit_to_remote ''button_save'',''Speichern'',{ :url => {:action => ''ajax_update'', :id => @product}, :update => ''formular'' } it doesn''t work, my form_tag looks like: form_remote_tag(:url => {:action =>