Skip to content

Commit

Permalink
#38 - Support more MIME types
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianbinau committed Oct 18, 2023
1 parent acf4d80 commit b3df408
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/modules/item/blob/blob.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,39 @@ export default class BlobController {
try {
const jsonResponse = await this.blobService.handleUpload(
request,
['text/plain'],
[
// Text
'text/plain',
'text/csv',
'text/xml',
// Images
'image/png',
'image/jpeg',
'image/gif',
'image/svg+xml',
'image/webp',
// Videos
'video/mp4',
'video/webm',
'video/ogg',
// Audio
'audio/mpeg',
'audio/ogg',
'audio/wav',
'audio/webm',
// Documents
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/zip',
'application/x-rar-compressed',
'application/x-7z-compressed',
'application/x-tar',
],
/* istanbul ignore next */ // Sadly this is not testable, beacuse the function is normally called by the blob service, with generated data
async ({ blob, tokenPayload }) => {
try {
Expand Down

0 comments on commit b3df408

Please sign in to comment.