search for: uploadedfile

Displaying 20 results from an estimated 23 matches for "uploadedfile".

Did you mean: uploaded_file
2012 Mar 04
4
How to retrieve a FileBlob from 'ActionDispatch::Http::UploadedFile' instance?
I have used ''remotipart'' gem to upload files asynchronously to server side. The instance passed to the server side is of ''UploadedFile'' . The Rails API mentions all the methods( like read(), open() ) and attributes for the class, however I am not sure how to retrieve the File and store it on the database. The documentation hardly says anything. Googling took me to no tutorials using this class. -- You received this...
2010 Aug 13
5
"uninitialized constant" Error for CalendarHelpper
After installing calendar_helper-0.2.3 gem, application using CalendarHelper works fine. Then I tried to test using rake command which gave me the following error. Why does these messages appear evenif the application owrks fine. ------------------------------ Error Messags -------------------------------------- /usr/local/jruby-1.5.1/bin/jruby -I"lib:test"
2013 Mar 22
0
Should to_io be added to ActionDispatch::Http::UploadedFile?
.../rest-client/rest-client/issues/144#issuecomment-14876580> we''re trying to handle objects that behave like IO. Some have suggested that respond_to?(:read) is a poor test of this and have suggested using IO.try_covert(obj) instead. My counter example for this is ActionDispatch::Http::UploadedFile. I''m wondering if there would be any support for adding this method? I''d be happy to craft a pull request. See: http://www.ruby-doc.org/core-2.0/IO.html#method-c-try_convert Justin Coyne -- You received this message because you are subscribed to the Google Groups "Ruby...
2009 May 11
7
Upload file with url parameter
...er. I found one useful link about file uploading here(http:// www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm). Even I''ve changed some code in order to fit my rails version, it worked well. But the problem is I have use <form> tag. I don''t know how [view] make UploadedFile and pass it to [controller] and I tried to find how create UploadedFile. But failed :( Anyway, how can I upload my local file using above style url? help me plz, thx
2011 Aug 31
5
3.1rc8 - posting files in a test no longer works
A previously working test, that posted a file object no longer works in the latest 3.1. The test looks like this: params[:media][:new_attachment] = File.open("#{Rails.root}/test/data/ less_than_100.png") post :create, params In the controller, I obviously expect params[:media][:new_attachment] to be a File object - and it used to be. Now it looks like #inspect has been called on the
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of
2011 Mar 11
12
A file-upload suddenly seems to be nil
Hi there, I posted this issue <https://groups.google.com/forum/?hl=de#!topic/carrierwave/ergk9LaO68k>at the carrierwave-group, but I''m beginning to think this rather is a rails-issue than a problem with carrierwave. The problem''s this: I have 2 models, ''article'' and ''upload''. article has_many :uploads. In my article_controller i
2009 Mar 28
1
Image uploading - upload_column
Hai I am using upload_column for uploading images. Trying to do the user registration. For the first time when the user tries to upload image it works fine. But when try to update the image an error undefined method `process!'' for #<UploadColumn::UploadedFile:0x6838424> occurs. in my view I set the :multipart=>true. and in controller in the edit action @user = User.find(params[:id]) and in update action @user.update_attributes(params[:user]). Do I need to add anything more? Please help , thanks in advance -- Posted via http://www.ruby-forum.com...
2011 Jul 14
0
Converting an Uploaded File to a string while maintaining binary data
Ok so it boils down to this I uploaded a picture into a ActionDispatch::Http::UploadedFile and want to convert it to a string before I send it off google storage. When I do this it complains about having null characters. I had the same problem when I was experimenting with files from my hard drive with the same function. I was able to do it with: File.open( ''filename''...
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
...;=>"testing image upload"}, "commit"=>"Add", "action"=>"create", "controller"=>"clips", "locale"=>"en_GB"} I should have the image upload data : "image"=>#<ActionDispatch::Http::UploadedFile:0... @original_filename="...", @content_type="image/jpeg", @headers=... @tempfile=#<File:/var/folders/NK/N...>> what could be wrong ? is the remote-true incompatible ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:...
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
...ontrollers/upload_files_controller.rb:28:in `create'' Request Parameters: {"utf8"=>"✓", "authenticity_token"=>"2JJGtRXjWCZlPNhQdx6wOW4xvTseiRaXNylnUYvA5v4=", "upload_files"=>{"inventory"=>#<ActionDispatch::Http::UploadedFile:0x2fd8940 @original_filename="1_Inventory.xlsx", @content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", @headers="Content-Disposition: form-data; name=\"upload_files[inventory]\"; filename=\"1_Inventory.xlsx\"\r\nContent-Typ...
2010 Mar 13
1
Testing file upload (Sinatra, RSpec, Rack-Test)
...unner.configure do |conf| conf.include Rack::Test::Methods conf.include MyHelpers end describe ''Application'' do it ''should accept uploaded files and save them into the `files` directory'' post ''/'', ''file'' => Rack::Test::UploadedFile.new(''fixtures/test_file.png'', ''image/png'') Dir[''files/*''].should include(''files/test_file.png'') end end # controller.rb require ''sinatra'' require ''fileutils'' post ''/'' d...
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
...;resource"=> { "resource_type"=>"document", "resource_name"=>"My Rails Doc", "source_id"=>"Dropbox" }, "resource_document"=> { "resource_document"=> #<ActionDispatch::Http::UploadedFile:0x007f8e919d06f8 @content_type="text/plain", @headers= "Content-Disposition: form-data; name=\"resource_document[resource_document]\"; filename=\"rails_local_env_setup.txt\"\r\n Content-Type: text/plain\r\n", @origin...
2006 Aug 15
0
filenames mangled on upload
I''m having problems with filenames being mangled when uploaded - usually truncated either upto or after some problematic character. Here''s an example: Filename in filesystem: s+o~1@#%^&*()_-=[]{};:''".txt uploadedfile#original_filename: s+o~1@#%^&*()_-=[]{} Is this a rails/cgi.rb issue or a browser one? I note that gmail''s "attach file" truncates the filename too, but it does it at the '' whereas rails does it at the ; . So I''m guessing it''s a serverside rather t...
2007 Apr 18
0
Stereo speex on Blackfin
...s - the Speex that is included in the Blackfin multimedia SDK is an __old__ (about ~2-3 years ago) version of speex that someone at ADI ported (not Jean-Marc - so don't blame him for anything). I think it was done the same time this was written (late 2004/early 2005): http://www.analog.com/UploadedFiles/Technical_Articles/296785076open_source.pdf So you might have some luck contacting those authors. Speex has gone through alot of improvements since then, and I don't think the speex you have produces a binary compatible bitstream with the current trunk/release (if you are not looking for c...
2014 Jun 18
0
R128gain & metaflac
...still write ReplayGain tags (not some new R128 tags), with the reference level that matches the reference level of the current RG algorithm. For example, foobar2000 uses the following formula: "RG_gain = -18 - loudness_by_R128" in accordance to the section 3.2.2.3 in http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf And it seems that dBpoweramp uses it too ( http://forum.dbpoweramp.com/showthread.php?34044-ReplayGain-Utility-Codec-R4 ) -- "EBU R128 used by default", "EBU R128 defaults to -18 LUFS".
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/" #
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart` from a Heroku application to Facebook. I have the following JSON object: {"message"=>"My message", "image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490 @original_filename="neEZYMAnBI.jpg", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"image\"; filename=\"/home/user/public/direct/fb_images/neEZYMAnBI.jpg\"\r\nContent-Type: application/octet-st...
2011 May 17
2
Can't dump File ... when uploading files
I am getting this error on the redirect_to command ... I am using Rails 3 w Paperclip to upload files ( but I tried also CarrierWave .. same error) I tried to change the session store from cookie-based to database .. same error I tried to delete the params content ... I don''t know what to try next .. any clue ? thanks erwin -- You received this message because you are subscribed to
2007 Apr 16
4
Stereo speex on Blackfin
Hi, I'm trying to encode a stereo speex file on the blackfin without much luck. This is a standalone application with no OS using the speex library provided in the blackfin multimedia sdk. I believe this library was ported to run using Visual DSP++ by Jean-Marc (may be wrong). I have mono encoding working fine, to add stereo encoding I just added a call to speex_encode_stereo_int()