1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #649 from XVicarious/webp

Allow WEBP Uploading
This commit is contained in:
dkanada 2020-01-11 15:19:14 +09:00 committed by GitHub
commit 367f55cf59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ define(['dialogHelper', 'connectionManager', 'dom', 'loading', 'scrollHelper', '
return false; return false;
} }
if (file.type !== "image/png" && file.type !== "image/x-png" && file.type !== "image/jpeg") { if (!file.type.startsWith("image/")) {
require(['toast'], function (toast) { require(['toast'], function (toast) {
toast(globalize.translate('MessageImageFileTypeAllowed')); toast(globalize.translate('MessageImageFileTypeAllowed'));
}); });

View file

@ -22,7 +22,7 @@
<div class="imageEditor-dropZone fieldDescription"> <div class="imageEditor-dropZone fieldDescription">
<div>${LabelDropImageHere}</div> <div>${LabelDropImageHere}</div>
<output id="imageOutput" class="flex align-items-center justify-content-center" style="position: absolute;top:0;left:0;right:0;bottom:0;width:100%;"></output> <output id="imageOutput" class="flex align-items-center justify-content-center" style="position: absolute;top:0;left:0;right:0;bottom:0;width:100%;"></output>
<input type="file" accept="image/png,image/x-png,image/jpeg" id="uploadImage" name="uploadImage" style="position: absolute;top:0;left:0;right:0;bottom:0;width:100%;opacity:0;" /> <input type="file" accept="image/*" id="uploadImage" name="uploadImage" style="position: absolute;top:0;left:0;right:0;bottom:0;width:100%;opacity:0;" />
</div> </div>
<div id="fldUpload" class="hide"> <div id="fldUpload" class="hide">
<br /> <br />