mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 20:54:22 -04:00
Add x-adobe-dng to support file type (#504)
This commit is contained in:
parent
0cf7606ec9
commit
068d06b9ee
@ -9,7 +9,7 @@ import { randomUUID } from 'crypto';
|
|||||||
|
|
||||||
export const assetUploadOption: MulterOptions = {
|
export const assetUploadOption: MulterOptions = {
|
||||||
fileFilter: (req: Request, file: any, cb: any) => {
|
fileFilter: (req: Request, file: any, cb: any) => {
|
||||||
if (file.mimetype.match(/\/(jpg|jpeg|png|gif|mp4|x-msvideo|quicktime|heic|heif|dng|webp)$/)) {
|
if (file.mimetype.match(/\/(jpg|jpeg|png|gif|mp4|x-msvideo|quicktime|heic|heif|dng|x-adobe-dng|webp)$/)) {
|
||||||
cb(null, true);
|
cb(null, true);
|
||||||
} else {
|
} else {
|
||||||
cb(new HttpException(`Unsupported file type ${extname(file.originalname)}`, HttpStatus.BAD_REQUEST), false);
|
cb(new HttpException(`Unsupported file type ${extname(file.originalname)}`, HttpStatus.BAD_REQUEST), false);
|
||||||
|
@ -28,7 +28,7 @@ export const openFileUploadDialog = (uploadType: UploadType) => {
|
|||||||
|
|
||||||
fileSelector.type = 'file';
|
fileSelector.type = 'file';
|
||||||
fileSelector.multiple = true;
|
fileSelector.multiple = true;
|
||||||
fileSelector.accept = 'image/*,video/*,.heic,.heif';
|
fileSelector.accept = 'image/*,video/*,.heic,.heif,.dng';
|
||||||
|
|
||||||
fileSelector.onchange = async (e: any) => {
|
fileSelector.onchange = async (e: any) => {
|
||||||
const files = Array.from<File>(e.target.files);
|
const files = Array.from<File>(e.target.files);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user