Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix mime import

Alexander Brandon Colesd40051050669
diff --git a/frontend/src/app/core/upload/fog-upload.service.ts b/frontend/src/app/core/upload/fog-upload.service.ts
index fa0fdf0d344..ebbb551d634 100644
--- a/frontend/src/app/core/upload/fog-upload.service.ts
+++ b/frontend/src/app/core/upload/fog-upload.service.ts
@@ -26,7 +26,7 @@
// See COPYRIGHT and LICENSE files for more details.
//++
-import { getType } from 'mime';
+import mime from 'mime';
import { Observable, of } from 'rxjs';
import { map, share, switchMap } from 'rxjs/operators';
import { HttpClient, HttpEvent, HttpEventType } from '@angular/common/http';
@@ -69,7 +69,7 @@ export class FogUploadService extends OpUploadService {
private prepareUpload(href:string, uploadFile:AttachmentUploadFile):Observable<PrepareUploadData> {
const fileName = uploadFile.file.name;
- const contentType = (uploadFile.file.type || (fileName && getType(fileName)) || '' as string);
+ const contentType = (uploadFile.file.type || (fileName && mime.getType(fileName)) || '' as string);
const metadata = {
fileName,
contentType,