support more image formats, server avif is supported for larger images
This commit is contained in:
parent
0748265fe6
commit
406237b837
9 changed files with 31 additions and 11 deletions
|
|
@ -8,7 +8,7 @@ pandora.ui.uploadDocumentDialog = function(options, callback) {
|
|||
existingFiles = [],
|
||||
uploadFiles = [],
|
||||
|
||||
supportedExtensions = ['gif', 'jpg', 'jpeg', 'pdf', 'png'],
|
||||
supportedExtensions = ['gif', 'jpg', 'jpeg', 'pdf', 'png', 'webp', 'heic', 'heif', 'avif'],
|
||||
|
||||
filename,
|
||||
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ pandora.createLinks = function($element) {
|
|||
};
|
||||
|
||||
pandora.uploadDroppedFiles = function(files) {
|
||||
var documentExtensions = ['pdf', /* 'epub', 'txt', */ 'png', 'gif', 'jpg', 'jpeg'];
|
||||
var documentExtensions = ['pdf', /* 'epub', 'txt', */ 'png', 'gif', 'jpg', 'jpeg', 'webp', 'heic', 'heif', 'avif'];
|
||||
files = Ox.map(files, function(file) { return file });
|
||||
|
||||
if (files.every(function(file) {
|
||||
|
|
@ -2132,7 +2132,9 @@ pandora.getSpan = function(state, val, callback) {
|
|||
} else {
|
||||
state.span = val;
|
||||
}
|
||||
} else if (Ox.contains(['gif', 'jpg', 'png'], extension)) {
|
||||
} else if (Ox.contains([
|
||||
'gif', 'gif', 'jpg', 'png', 'webp', 'heic', 'heif', 'avif'
|
||||
], extension)) {
|
||||
values = val.split(',');
|
||||
if (values.length == 4) {
|
||||
state.span = values.map(function(number, index) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue