如何获取图像文件?

时间:2012-07-27 05:10:32

标签: html ruby heroku

我已将我的ruby代码放在heroku中。问题是,我有一个表单,它有浏览按钮,以从用户获取图像。单击“浏览”时,它会显示要选择的窗口,选择后会在服务器中查找图像,而不是在用户系统中查找。如何让它看看用户系统获取图像并存储在heroku的tmp文件夹中?

<form action="upload.php" method="post" enctype="multipart/form-data"> 
<label for="file">Filename:</label>
<input type="file" name="file" id="file" >

1 个答案:

答案 0 :(得分:0)

使用非常好的paperclip gem比在这个上重新发明轮子要容易得多。