similar to: Testing File Upload error

Displaying 20 results from an estimated 40000 matches similar to: "Testing File Upload error"

2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl include ActionDispatch::TestProcess FactoryGirl.define do factory :article do ....... photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' } end end IN mt test_helper.rb I defined the fixture_path def fixture_path File.dirname(__FILE__) + "/fixtures/" #
2014 Feb 18
0
How to Test Multimodel Paperclip attachments?
I'm using Rspec and FactoryGirl to create specs for multimodel paperclip attachments. From searching other questions, it seems like a single image attachment is more common. Car.rb class Car < ActiveRecord::Base has_many :uploads, dependent: :destroy validates :uploads, presence: { message: 'You must upload at least one image' }
2007 Apr 24
1
Testing for multipart form uploads
Hi, I''m trying to do integration tests that require uploading files via multipart posts. Have seen a very similar discussion, but cannot get it to work. Maybe, it''s out of date now with Rails 1.2.3: http://groups.google.ca/group/rubyonrails-talk/browse_thread/thread/fdfd2c040a2425f4 >From what I understand, fixture_file_upload''s output is translated a String.
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2015 Apr 21
2
How to upload new ups driver to NUT
Dear Sir , Can anyone tell me how to upload new ups driver to NUT website ? Best regards, Bluefish [cid:image001.jpg at 01D07C3E.C4ADB780] ?? ?? ?? ?????? ?????(??)???? ??????????107?????467?(?????) ??????5?1?A?2?4? 1-4F, Building 5, YuSheng lndustrial Park, No.467, Section Xixiang, National Highway 107, Xixiang, Bao An District, Shenzhen, China Tel: + 86-755-8601-6601 Ext. 8598 Fax:
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
2007 Nov 09
9
fixture_file_upload and edge rspec?
Hi all, I had some specs that were using fixture_file_upload that were passing just fine. Then I froze edge rails to get some 2.0 functionality, then a I upgraded to trunk rspec to deal with uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper After a couple other of tribulations, I have now gotten down to just a couple of not passing specs, all using the fixture_file_upload.
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 directory -
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 Feb 04
0
Samba FAST upload, SLOW download?!
Hi guys, I am running samba 3.023 @ Debian 4.0 Etch (Still beta, but had the same problem om Debian 3.1r3) The strange thing is my upload speed is about 30MB/s, but the download speed is about 5MB/s. I have noticed breaks during the download. (look at attached images). The server is a Opteron 144 @ 1.8 GHz with 2GB DDR and 4 SATA disks in RAID 10 configuration (this should be good enough for a
2008 Apr 23
0
Upload a file using Net:HTTP multipart post or ActiveResource
Hi Guys, I am trying to upload a file to a rails server using a ruby script. http://pastie.org/185380 I verified the parameters of the Net:HTTP post request and they seem to be right. However the recipient, mongre,l shows following message in console and the parameters sent, the file data, is all corrupted. oh and one very weird thing happened. the console running mongrel looks like following
2005 Dec 16
0
upload problem with mimetypes
I am building a flash-based uploader for rails that allows multiple files to be selected from a user''s hard drive and then put into a queue for upload. This works great except that macromedia uploads everything as "application/octet-stream". This means that displaying the newly uploaded content inline is a pain because the browser asks to download it first. To get around this I
2006 Dec 03
1
File Upload Unix Only?
I tried the upload feature in merb 0.0.7 using http://localhost:4000/files I get the following: Permission denied - D:/Temp/Merb.5172.0 or E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/public/files/foobar.jpg - (Errno::EACCES) C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `rename'' C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `mv'' C:/Ruby/lib/ruby/1.8/fileutils.rb:1379:in
2014 Mar 10
0
Rails 4 - Remote upload image
I have a bookmark controller. My new.html.erb file has an input field called thumbnail url So if someone fill that field with valid image url like http://example.com/image1.jpg, then I would like to remote upload that image to my server. Can someone tell me whats the easiest way to do this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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.
2006 May 01
10
large file storing in postgres sucks?
Hi, I''m not sure if this is a postgres issue or not, but I''m using Postgres 8.1. I have (in my functional tests) the following code: upload = fixture_file_upload(''/files/podcast.mp3'', ''audio/mpeg'') post :create, :product => valid_product, :media => { :image => upload } And then in the controller: blob = Blob.create :data
2015 Sep 03
0
Redirected Folders not working for Desktop
Did you "hide" the share (browseable = no) Looks ok to me, what i see be low. And what i supsected. Event id 502. Do you see: Error details: “This security ID may not be assigned as the owner of this object.”. If so, or correct the rights, or set gpo. Or read throug this side, and fix your rights setup.
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
2010 Sep 21
0
Upload form with uploadify jquery plugin
I would like to integrate the uploadify plugin with a standard rails form. However I can''t figure out how to add a new field and have it get submitted with the file upload. I added a name field into the form, but the valued does not get submitted. <% dialog_file_description = ''Photos'' allowed_extensions = [:jpg, :jpeg, :gif, :png] max_size = 20.megabyte
2008 Jun 09
10
Testing file attachment with Paperclip
Does someone have an example on faking a file upload for just ensuring it gets called, without actually uploading the file to s3. I thought that stubbing Model.has_attached_file would be enough, but it doesn''t seem so ... This is what I did: Video.stub!( :has_attached_file ).with( :name ).and_return( true ) has_attached_file is from paperclip, it gets mixed to the model. 1)