File selection dialog accepts only image types
This commit is contained in:
parent
5bb0798311
commit
37e4242fdf
3 changed files with 3 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ Diaspora.PostPhotoUploader = class {
|
|||
}
|
||||
},
|
||||
validation: {
|
||||
acceptFiles: "image/png, image/jpeg, image/gif",
|
||||
allowedExtensions: ["jpg", "jpeg", "png", "gif"],
|
||||
sizeLimit: (window.Promise && qq.supportedFeatures.scaling ? null : this.sizeLimit)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ Diaspora.ProfilePhotoUploader = class {
|
|||
this.fineUploader = new qq.FineUploaderBasic({
|
||||
element: this.fileInput,
|
||||
validation: {
|
||||
acceptFiles: "image/png, image/jpeg",
|
||||
allowedExtensions: ["jpg", "jpeg", "png"]
|
||||
},
|
||||
request: {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Diaspora.ProfilePhotoUploader.prototype = {
|
|||
new qq.FineUploaderBasic({
|
||||
element: document.getElementById("file-upload"),
|
||||
validation: {
|
||||
acceptFiles: "image/png, image/jpeg, image/gif",
|
||||
allowedExtensions: ["jpg", "jpeg", "png"],
|
||||
sizeLimit: 4194304
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue