I have an app which uploads videos, using a 3rd party host (bitsontherun). Everything works fine, except it doesn't have an upload progress bar, so I'm trying to use fineuploader to show one. However I keep getting 2 errors in the developer window in Chrome, and the file no longer uploads:
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
I've followed their set-up instructions:
$(".videos-fine-uploader").fineUploader
request:
endpoint: "/video.json"
debug: truedebug: true
The error, I'm think, is with the endpoint, which points the jQuery to a route. However, whatever route I point it to, it doesn't work. What I need to do is put the following (successful) params, but I have no idea how even after reading over a dozen different SO answers and tutorials from around the web.
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"}
Could anyone advise me on best next steps to get this working?
Thx