Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: File Upload Accepted Extension

stokkup2313 priority asked 9 months ago


Expected behavior When having this code in angular:

<mdb-file-upload #fileUpload [acceptedExtensions]="'image/*,.pdf,.ai,.psd'" [height]="100" class="img-fluid" (fileAdded)="onFileAdded($event)" [acc] [defaultMsg]="'We prefer vector (AI) files, but if your design is a flat image, please upload a high-resolution or PSD file. We will still send an art approval to ensure we have the graphics correct.'"></mdb-file-upload>

If I were to upload an ai file, or psd , it show allow me to upload those.

Actual behavior

When I try to upload an ai file or psd it throws and error: Your file has incorrect format

Resources (screenshots, code snippets etc.)enter image description here


Rafał Seifert free answered 9 months ago


It looks like .ai files have some special mime type that we are not supporting. We will take a look into this and will try to fix it. For now you can try to add this additional format to handle your .ai files:

[acceptedExtensions]="'image/*,.pdf,.ai,.psd,application/postscript'"


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 5.1.0
  • Device: MBP
  • Browser: Chrome
  • OS: 13.4.1 (22F82)
  • Provided sample code: No
  • Provided link: No