Fix error message on mobile image upload, close #5396
This commit is contained in:
parent
b0e608aa38
commit
96e0635bff
1 changed files with 7 additions and 8 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
//= require js_image_paths
|
//= require js_image_paths
|
||||||
|
|
||||||
function createUploader(){
|
function createUploader(){
|
||||||
|
|
||||||
var aspectIds = gon.preloads.aspect_ids;
|
var aspectIds = gon.preloads.aspect_ids;
|
||||||
|
|
||||||
new qq.FileUploaderBasic({
|
new qq.FileUploaderBasic({
|
||||||
|
|
@ -10,7 +9,7 @@ function createUploader(){
|
||||||
params: {'photo' : {'pending' : 'true', 'aspect_ids' : aspectIds},},
|
params: {'photo' : {'pending' : 'true', 'aspect_ids' : aspectIds},},
|
||||||
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'tiff'],
|
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'tiff'],
|
||||||
action: "/photos",
|
action: "/photos",
|
||||||
debug: true,
|
debug: false,
|
||||||
button: document.getElementById('file-upload-publisher'),
|
button: document.getElementById('file-upload-publisher'),
|
||||||
sizeLimit: 4194304,
|
sizeLimit: 4194304,
|
||||||
|
|
||||||
|
|
@ -21,8 +20,8 @@ function createUploader(){
|
||||||
|
|
||||||
messages: {
|
messages: {
|
||||||
typeError: Diaspora.I18n.t("photo_uploader.invalid_ext"),
|
typeError: Diaspora.I18n.t("photo_uploader.invalid_ext"),
|
||||||
sizeError: Diaspora.I18n.t("photo_uploader.new_photo.size_error"),
|
sizeError: Diaspora.I18n.t("photo_uploader.size_error"),
|
||||||
emptyError: Diaspora.I18n.t("photo_uploader.new_photo.empty")
|
emptyError: Diaspora.I18n.t("photo_uploader.empty")
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit: function(){
|
onSubmit: function(){
|
||||||
|
|
@ -75,10 +74,10 @@ function createUploader(){
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onAllComplete: function(){
|
onAllComplete: function(){}
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
window.addEventListener("load", function() {
|
||||||
createUploader();
|
createUploader();
|
||||||
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue