简体   繁体   中英

Rails - select a file from local and store it as uploaded

I am interested to select a file from my local with Rails, so to be able to recall the following methods:

  • original_filename;
  • read;

without need to use of a form.

Is it possible?

Luca

I found the right method

Rack::Multipart::UploadedFile.new( path )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM