私はファイルをアップロードするためにblueimpを使用しています。そのうまく動作します。しかし、特定の幅/高さの画像をアップロードしたいと思います。それは、ファイルを取得するための正しい場所は 私は blueimp fileupload - check the image width and height before upload ファイルはこのデータだけ blueimpで画像ファイルをアップロードする際の幅と高さが得られません
lastmodified:1502124635085
name:name.jgp
size:111111
type:"image/jpeg"
しかし、幅と高さは、以下 が不足しているを持っている。このリンクをたどるしようとしたコード
add: function (e, data) {
if (e.isDefaultPrevented()) {
return false;
}
console.log(data.files[0]);
var $this = $(this),
that = $this.data('blueimp-fileupload') ||
$this.data('fileupload'),
options = that.options;
data.context = that._renderUpload(data.files)
.data('data', data)
.addClass('processing');
options.filesContainer[
options.prependFiles ? 'prepend' : 'append'
](data.context);
that._forceReflow(data.context);
that._transition(data.context);
data.process(function() {
return $this.fileupload('process', data);
}).always(function() {
data.context.each(function (index) {
$(this).find('.size').text(
that._formatFileSize(data.files[index].size)
);
}).removeClass('processing');
that._renderPreviews(data);
}).done(function() {
data.context.find('.start').prop('disabled', false);
if ((that._trigger('added', e, data) !== false) &&
(options.autoUpload || data.autoUpload) &&
data.autoUpload !== false) {
data.submit();
}
}).fail(function() {
if (data.files.error) {
data.context.each(function (index) {
var error = data.files[index].error;
if (error) {
$(this).find('.error').text(error);
}
});
}
});
},
の一部でありますデータまたは他の場所。あなたはデフォルトprocess queue
以下の例にcostomised process action
を追加することができます おかげ
をサポートしています。 –