我有一个使用 3rd 方主机(bitsontherun)上传视频的应用程序。一切正常,除了它没有上传进度条,所以我正在尝试使用fineuploader 来显示一个。但是,我在 Chrome 的开发人员窗口中不断收到 2 个错误,并且文件不再上传:
POST http://testevent.xavy.dev/video.json?qqfile=Kitten+Wearing+a+Tiny+Hat+-+Audition+Outtakes+(tuvideo.matiasmx.com).mp4 404 (Not Found) fineuploader.jquery.js:2383
qq.extend._upload fineuploader.jquery.js:2383
qq.UploadHandlerAbstract.upload fineuploader.jquery.js:1986
qq.FineUploaderBasic._uploadFile fineuploader.jquery.js:946
qq.FineUploaderBasic._uploadFileList fineuploader.jquery.js:926
qq.FineUploaderBasic.addFiles fineuploader.jquery.js:737
qq.FineUploaderBasic._onInputChange fineuploader.jquery.js:855
qq.UploadButton.onChange fineuploader.jquery.js:748
(anonymous function) fineuploader.jquery.js:557
[FineUploader] Error when attempting to parse xhr response text (SyntaxError: Unexpected token <) fineuploader.jquery.js:157
qq.log fineuploader.jquery.js:157
qq.FineUploaderBasic.log fineuploader.jquery.js:667
qq.extend._onComplete fineuploader.jquery.js:2406
xhr.onreadystatechange fineuploader.jquery.js:2345
我已按照他们的设置说明进行操作:
$(".videos-fine-uploader").fineUploader
request:
endpoint: "/video.json"
debug: truedebug: true
我认为,错误在于端点,它将 jQuery 指向一个路由。但是,无论我指向什么路线,它都行不通。我需要做的是放置以下(成功的)参数,但即使在阅读了来自网络的十几个不同的 SO 答案和教程之后,我也不知道如何。
Started POST "/videos" for 127.0.0.1 at 2012-12-22 18:26:07 +0000
Processing by VideosController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"lg/*******=", "video"=>{"title"=>"test", "industry_list"=>"", "speaker_list"=>"", "theme_list"=>"", "description"=>"test", "user_id"=>"", "video_url"=>#<ActionDispatch::Http::UploadedFile:0x007fe2018a2d58 @original_filename="Kitten Wearing a Tiny Hat - Audition Outtakes (tuvideo.matiasmx.com).mp4", @content_type="video/mp4", @headers="Content-Disposition: form-data; name=\"video[video_url]\"; filename=\"Kitten Wearing a Tiny Hat - Audition Outtakes (tuvideo.matiasmx.com).mp4\"\r\nContent-Type: video/mp4\r\n", @tempfile=#<File:/var/folders/jl/nqsrgwy973j73gnj4j1hd2hc0000gn/T/RackMultipart20121222-14651-1824c66>>}, "commit"=>"Create Video"}
任何人都可以告诉我最好的后续步骤以使其正常工作吗?
谢谢