ngx-awesome-uploader icon indicating copy to clipboard operation
ngx-awesome-uploader copied to clipboard

File extensions and image cropped are not working correctly

Open zhuniqiabedin opened this issue 4 years ago • 5 comments

I came over a bug here that the file extensions are not working properly. If you have fileExtensions]="['pdf', 'jpg', 'jpeg', 'png', 'mp4', 'css']" when you try to upload photo you can have access on all files not only images. Second error it is that when upload photo even it is cropped the file size will not change it is still the same as the original photo.

zhuniqiabedin avatar Dec 07 '20 13:12 zhuniqiabedin

@zhuniqiabedin , you have got any workaround to proceed further. its same issue for me as well.

kishoreaoe avatar Apr 11 '21 04:04 kishoreaoe

@kishoreaoe HI, you can use accept property for that. Pls see in documentation

vugar005 avatar Apr 11 '21 16:04 vugar005

dear @vugar005 , thanks for your prompt reply. i've tried both the ways as given below, still the library is picking as default.

<ngx-awesome-uploader #uploader [fileMaxCount]="1" [fileMaxSize]="90000" [uploadType]="'single'" (validationError)="onValidationError($event)" [fileExtensions]="['jpg', 'jpeg', 'png']" [accept]="['jpg', 'jpeg', 'png']" (uploadSuccess)="onUploadSuccess($event)" (fileAdded)="onFileAdded($event)" [customValidator]="myCustomValidator" [showPreviewContainer]="false">

Please advise if we are doing any wrong way.

kishoreaoe avatar Apr 12 '21 09:04 kishoreaoe

@kishoreaoe Hi, you provide input incorrectly. You should use Example: [accept]="'.jpg, .png'"

vugar005 avatar Apr 14 '21 20:04 vugar005

Thanks alot for your help , @vugar005 . its working :)

kishoreaoe avatar Apr 15 '21 10:04 kishoreaoe