search for: file_to_upload

Displaying 3 results from an estimated 3 matches for "file_to_upload".

2006 Jun 09
8
[how can i delete a file system..please help]
Hi, I''m trying to delete a file system (<xml_26548975.xml>) File.delete("xml_26548975.xml") But I get this error: "Permission denied - ./script/../config/../uploads/xml_26548975.xml". Why? -- Cheers, ioana k&a http://boulangerie.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 24
0
Mongrel errors on file upload
...by/lib/ruby/gems/1.8/gems/mongrel-0.3.11-mswin32/bin/mongrel_rails:228 C:/InstantRails-1.3/ruby/bin/mongrel_rails:18 Here''s my code. ------------ create_controller.rb -------------- class CreateController < ApplicationController def index end def read_in if params[:file_to_upload].instance_of?(Tempfile) FileUtils.copy(params[:file_to_upload].local_path, "#{RAILS_ROOT}/public/sandbox1.xml") @location_display = "Copied the Tempfile to sandbox1.xml" else File.open("#{RAILS_ROOT}/public/sandbox2.xml","w"){|f|...
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 }