ng2-file-upload icon indicating copy to clipboard operation
ng2-file-upload copied to clipboard

allowedFileType

Open aliChavoshi opened this issue 2 years ago • 1 comments

hi i user allowedFileType: ['.mp4'] or allowedFileType: ['mp4'], this code not working .how user type mp4 ? tnx

aliChavoshi avatar Apr 05 '22 04:04 aliChavoshi

Hello, @aliChavoshi, this is quite late but the correct usage would be ['video'], for allowedFileType.

this.uploader = new FileUploader({
      url: URL,
      method: 'PUT',
      disableMultipart: true,
      allowedFileType: ['video'],
    });

If you need to allow only mp4 videos, though, use allowedMimeType:

this.uploader = new FileUploader({
      url: URL,
      method: 'PUT',
      disableMultipart: true,
      allowedMimeType: ['video/mp4'],
    });

pedroqueiroga avatar Mar 09 '23 20:03 pedroqueiroga