cancel
Showing results for 
Search instead for 
Did you mean: 

Upload files

Former Member
0 Kudos

I am trying to upload a file but I don´t know why it is not working well. The problem is "undefined method `read' for "C:

1266.pdf":String". It always takes me the file as String not as hybrid. I think the problem is related to :multipart but my sentence seems to be correct.

<%=form_tag({:action => 'create'},:multipart => true)%>

Thanks for your help in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor
0 Kudos

Hello,

have you tried Google and found:

http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles

?

Regards

Gregor

Former Member
0 Kudos

Yes, in fact I have tried an example but my problem is the following :

undefined method `read' for "importante.txt":String

The "importante.txt" is not converted into file type and stays as String. I want to know why it is difficult to read the content of the file.

I suppose the problem could be because of :multipart tag but I do not know how to resolve it. I have apply son patches to resolve bugs in rails but the problem is still there.

Thanks for your help

Former Member
0 Kudos

The issue you are having must be in the controller and the view - in that case it is a specific Rails related question, and is nothing to do with SAP and sap4rails. You should really take this question to the RubyOnRails forums, or ask a question on the IRC channel.

Piers Harding.