Merge pull request #8205 from tclaus/8189-filter-upload-image-types
File selection dialog accepts only image types
This commit is contained in:
commit
1ef0cef74c
4 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ Although the chat was never enabled per default and was marked as experimental,
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Fix multiple photos upload progress bar [#7655](https://github.com/diaspora/diaspora/pull/7655)
|
* Fix multiple photos upload progress bar [#7655](https://github.com/diaspora/diaspora/pull/7655)
|
||||||
|
* Photo-upload file picker now correctly restricts possible file types [#8205](https://github.com/diaspora/diaspora/pull/8205)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Add client-side cropping of profile image uploads [#7581](https://github.com/diaspora/diaspora/pull/7581)
|
* Add client-side cropping of profile image uploads [#7581](https://github.com/diaspora/diaspora/pull/7581)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ Diaspora.PostPhotoUploader = class {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validation: {
|
validation: {
|
||||||
|
acceptFiles: "image/png, image/jpeg, image/gif",
|
||||||
allowedExtensions: ["jpg", "jpeg", "png", "gif"],
|
allowedExtensions: ["jpg", "jpeg", "png", "gif"],
|
||||||
sizeLimit: (window.Promise && qq.supportedFeatures.scaling ? null : this.sizeLimit)
|
sizeLimit: (window.Promise && qq.supportedFeatures.scaling ? null : this.sizeLimit)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ Diaspora.ProfilePhotoUploader = class {
|
||||||
this.fineUploader = new qq.FineUploaderBasic({
|
this.fineUploader = new qq.FineUploaderBasic({
|
||||||
element: this.fileInput,
|
element: this.fileInput,
|
||||||
validation: {
|
validation: {
|
||||||
|
acceptFiles: "image/png, image/jpeg",
|
||||||
allowedExtensions: ["jpg", "jpeg", "png"]
|
allowedExtensions: ["jpg", "jpeg", "png"]
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ Diaspora.ProfilePhotoUploader.prototype = {
|
||||||
new qq.FineUploaderBasic({
|
new qq.FineUploaderBasic({
|
||||||
element: document.getElementById("file-upload"),
|
element: document.getElementById("file-upload"),
|
||||||
validation: {
|
validation: {
|
||||||
|
acceptFiles: "image/png, image/jpeg, image/gif",
|
||||||
allowedExtensions: ["jpg", "jpeg", "png"],
|
allowedExtensions: ["jpg", "jpeg", "png"],
|
||||||
sizeLimit: 4194304
|
sizeLimit: 4194304
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue