mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Add support for many missing raw formats (#2834)
* Allow upload of AVIF and x-canon-cr2 mime types * Allow generic RAW file mime type image/x-dcraw * Another place to uploading avif and cr2 * Determine mime type for .avif and .cr2 files correctly * Update asset-upload.config.spec.ts for CR2 and AVIF files * More changes for AVIF & CR2 files Found some other places where avif and cr2 should be mentioned. * Merge in upstream changes * Allow uploading and using most of the formats that libraw supports * Add raw files to allowable mobile uploads * Update asset-upload.config.spec.ts Fix errant commas. * Update asset-utils.ts Remove duplicate entry in hash table. * Fix missing k25 mime type in server upload check. Fix prettier formatting message in web file-uploader. * fix test --------- Co-authored-by: Elliot Lee <sopwith@gmail.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
c404ea20ee
commit
81e2b18531
6 changed files with 129 additions and 4 deletions
|
|
@ -47,6 +47,9 @@ class FileHelper {
|
|||
case 'webm':
|
||||
return {"type": "video", "subType": "webm"};
|
||||
|
||||
case 'avif':
|
||||
return {"type": "image", "subType": "avif"};
|
||||
|
||||
case 'insp':
|
||||
return {"type": "image", "subType": "jpeg"};
|
||||
|
||||
|
|
@ -56,6 +59,81 @@ class FileHelper {
|
|||
case 'arw':
|
||||
return {"type": "image", "subType": "x-sony-arw"};
|
||||
|
||||
case 'raf':
|
||||
return {"type": "image", "subType": "x-fuji-raf"};
|
||||
|
||||
case 'nef':
|
||||
return {"type": "image", "subType": "x-nikon-nef"};
|
||||
|
||||
case 'srw':
|
||||
return {"type": "image", "subType": "x-samsung-srw"};
|
||||
|
||||
case 'crw':
|
||||
return {"type": "image", "subType": "x-canon-crw"};
|
||||
|
||||
case 'cr2':
|
||||
return {"type": "image", "subType": "x-canon-cr2"};
|
||||
|
||||
case 'cr3':
|
||||
return {"type": "image", "subType": "x-canon-cr3"};
|
||||
|
||||
case 'erf':
|
||||
return {"type": "image", "subType": "x-epson-erf"};
|
||||
|
||||
case 'dcr':
|
||||
return {"type": "image", "subType": "x-kodak-dcr"};
|
||||
|
||||
case 'k25':
|
||||
return {"type": "image", "subType": "x-kodak-k25"};
|
||||
|
||||
case 'kdc':
|
||||
return {"type": "image", "subType": "x-kodak-kdc"};
|
||||
|
||||
case 'mrw':
|
||||
return {"type": "image", "subType": "x-minolta-mrw"};
|
||||
|
||||
case 'orf':
|
||||
return {"type": "image", "subType": "x-olympus-orf"};
|
||||
|
||||
case 'raw':
|
||||
return {"type": "image", "subType": "x-panasonic-raw"};
|
||||
|
||||
case 'pef':
|
||||
return {"type": "image", "subType": "x-panasonic-pef"};
|
||||
|
||||
case 'x3f':
|
||||
return {"type": "image", "subType": "x-sigma-x3f"};
|
||||
|
||||
case 'srf':
|
||||
return {"type": "image", "subType": "x-sony-srf"};
|
||||
|
||||
case 'sr2':
|
||||
return {"type": "image", "subType": "x-sony-sr2"};
|
||||
|
||||
case '3fr':
|
||||
return {"type": "image", "subType": "x-hasselblad-3fr"};
|
||||
|
||||
case 'fff':
|
||||
return {"type": "image", "subType": "x-hasselblad-fff"};
|
||||
|
||||
case 'rwl':
|
||||
return {"type": "image", "subType": "x-leica-rwl"};
|
||||
|
||||
case 'ori':
|
||||
return {"type": "image", "subType": "x-olympus-ori"};
|
||||
|
||||
case 'iiq':
|
||||
return {"type": "image", "subType": "x-phaseone-iiq"};
|
||||
|
||||
case 'ari':
|
||||
return {"type": "image", "subType": "x-arriflex-ari"};
|
||||
|
||||
case 'cap':
|
||||
return {"type": "image", "subType": "x-phaseone-cap"};
|
||||
|
||||
case 'cin':
|
||||
return {"type": "image", "subType": "x-phantom-cin"};
|
||||
|
||||
default:
|
||||
return {"type": "unsupport", "subType": "unsupport"};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue