【发布时间】:2012-12-30 01:25:37
【问题描述】:
我正在使用cloudinary 并在此处关注了所有内容:http://cloudinary.com/blog/direct_image_uploads_from_the_browser_to_the_cloud_with_jquery
这是我的看法haml:
= form_tag items_path do
= cl_image_upload_tag(:image_id, :crop => :limit, :width => 1000, :height => 1000)
= submit_tag 'Submit'
我已经检查并加载了所有 cloudinary javascript。该按钮正在将文件上传到 cloudinary,我的 chrome 控制台显示:
XHR finished loading: "https://api.cloudinary.com/v1_1/hhfk6ki1i/auto/upload". jquery.js:8417
send jquery.js:8417
jQuery.extend.ajax jquery.js:7969
send jquery.fileupload.js:600
$.widget._onSend jquery.fileupload.js:656
newData.submit jquery.fileupload.js:695
$.widget.options.add jquery.fileupload.js:137
$.Widget._trigger jquery.ui.widget.js:278
(anonymous function) jquery.fileupload.js:698
jQuery.extend.each jquery.js:612
$.widget._onAdd jquery.fileupload.js:688
$.widget._onChange jquery.fileupload.js:752
jQuery.event.dispatch jquery.js:3064
elemData.handle.eventHandle
我希望我的按钮在我选择一个文件后显示上传文件的名称。这应该归功于 cloudinary 插件,还是我应该实现所有 Javascript 来捕获该事件并更改我的上传标签?
我说的是这个总是显示“未选择文件”的按钮(即使文件已上传并在 Cloudinary 中可用):
顺便说一句:如果它是相关的。我没有使用carrierwave,也没有使用Attachinary,因为我使用的是couchrest_model
【问题讨论】:
标签: ruby-on-rails-3 file-upload cloudinary