jquery-fileupload-rails

How to make JQuery file upload plugin call backend only once for all the files in an upload?

耗尽温柔 提交于 2019-12-18 09:10:10
问题 I'm using sails.js to build a website. I have a model named timeline . It has some text fields along with a collection named pictures . Each timeline can have multiple pictures . I want to update all these fields at once when user clicks save . I'm using JQuery file uploader to help multifile upload. Problem is, JQuery file upload calls my backend file-uploader service once for each picture uploaded. I need to update the other text fields only once and they need to be updated before the

How to resize images client side using jquery file upload

房东的猫 提交于 2019-11-30 16:35:59
I am using blueimp jquery-file-upload in a Rails 3.2 app, via the jquery-fileupload-rails gem. I am trying to resize images on the client side prior to uploading, but am having trouble following the documentation. My code is below. Currently uploading works perfectly, but the images are not resized. What is the correct syntax to resize images via jquery-file-upload. (Two approaches shown in the coffeescript based on this and this documentation. Neither works for me.) #Coffeescript jQuery -> if $("#new_asset").length $("#new_asset").fileupload dataType: "script" add: (e, data) -> types = /(\.|\

How to resize images client side using jquery file upload

一曲冷凌霜 提交于 2019-11-30 00:22:10
问题 I am using blueimp jquery-file-upload in a Rails 3.2 app, via the jquery-fileupload-rails gem. I am trying to resize images on the client side prior to uploading, but am having trouble following the documentation. My code is below. Currently uploading works perfectly, but the images are not resized. What is the correct syntax to resize images via jquery-file-upload. (Two approaches shown in the coffeescript based on this and this documentation. Neither works for me.) #Coffeescript jQuery ->

How to make JQuery file upload plugin call backend only once for all the files in an upload?

谁说胖子不能爱 提交于 2019-11-29 16:09:16
I'm using sails.js to build a website. I have a model named timeline . It has some text fields along with a collection named pictures . Each timeline can have multiple pictures . I want to update all these fields at once when user clicks save . I'm using JQuery file uploader to help multifile upload. Problem is, JQuery file upload calls my backend file-uploader service once for each picture uploaded. I need to update the other text fields only once and they need to be updated before the pictures records get created since each picture needs to have a timeline ID associated with them. Is async