wKoza / ngx-upload

Ngx-upload is an upload module for Angular Ivy ready
30 stars 15 forks source link

Mine types #73

Closed ghten closed 4 years ago

ghten commented 4 years ago

Hi,

I have this in options public optionsInput: InputFileOptions = { multiple: true, accept: [MineTypeEnum.Image, MineTypeEnum.Application_Pdf], }; but the upload file accept all types of files. I just want images and PDFs

Thanks

wKoza commented 4 years ago

Hi @ghten , It's curious , I can't reproduce this. Which browser do you use ? And what kind of file is problematic ? If you take a look this link https://ngx-upload.github.io , there is the same configuration.

ghten commented 4 years ago

Yes, it's the same configuration, I use firefox but it's the same en chrome. In your example, it's ok in Bootstrap but in material, you have this screenshot-ngx-upload github io-2019 12 10-11_55_48

wKoza commented 4 years ago

hmm, it's weird. I can't reproduce that with firefox on MacOS and Windows. You dont't have any errors on your console ?

ghten commented 4 years ago

It's your example in github, it's your page. There are no errors in the console.

screenshot-ngx-upload github io-2019 12 10-13_20_59

wKoza commented 4 years ago

Ok, I get it when I force to "All file" my explorer / finder. I'll work out on that. Thanks for your report.

wKoza commented 4 years ago

fixes with commit https://github.com/wKoza/ngx-upload/commit/befeee3e560f810a7f939e90b6c9784fda2f2af3

ghten commented 4 years ago

Hi,

Sorry but I downloaded the version and the problem is the same and in your example too. FireShot Capture 034 - NgxUploaderIvy - ngx-upload github io

Have you found a solution? And another question it will be possible to select excel files because I have not seen it in the current version

Thanks

wKoza commented 4 years ago

Hi,

I uploaded the wrong version thursday. Now, It's the good version (8.0.6). You can try again here https://ngx-upload.github.io/.

Currently, we don't have a specific mimetype for Excel file. It's should be good with Application mimeType but it's the especially for Excel .

ghten commented 4 years ago

Sorry, this image has been made now.

ghten commented 4 years ago

The version in the image is 8.0.6 FireShot Capture 035 - NgxUploaderIvy - ngx-upload github io

wKoza commented 4 years ago

Ok , I got it ! I always use the click event on the drag & drop zone. I don't use the button. I can reproduce your issue. I'll take a look quickly at this problem

wKoza commented 4 years ago

There is a typo in my example. The optionInput wasn't binded . There is the right code :

<button mat-raised-button [color]="'primary'" >
  <ng-template [ngxInputFile]="optionsInput"> {{title}}</ng-template>
</button>

I change docs / app right now.

ghten commented 4 years ago

Ok, it's all right thanks