Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File extensions and image cropped are not working correctly #59

Open
zhuniqiabedin opened this issue Dec 7, 2020 · 5 comments
Open

Comments

@zhuniqiabedin
Copy link

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.

@vugar005 vugar005 added bug Something isn't working and removed bug Something isn't working labels Dec 17, 2020
@kishoreaoe
Copy link

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

@vugar005
Copy link
Owner

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

@kishoreaoe
Copy link

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.

@vugar005
Copy link
Owner

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

@kishoreaoe
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants