开发者

file_field not saving path in google chrome

开发者 https://www.devze.com 2023-03-09 04:20 出处:网络
I have a file field element in a view to save path of the file as follows: <%= file_field (:def, :sset) %>

I have a file field element in a view to save path of the file as follows:

<%= file_field (:def, :sset) %>

Later I am access开发者_运维技巧ing this file path as params[:def][:sset]. It works fine in Internet Explorer but Google Chrome is only saving the filename not file path. Is there any alternative to save file path too in Chrome?


Found the answer myself. I had to put :multipart=>true in the form_tag.

0

精彩评论

暂无评论...
验证码 换一张
取 消