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

Convert upload file to base64 #198

Open
KhaiNguyen01 opened this issue Dec 3, 2024 · 0 comments
Open

Convert upload file to base64 #198

KhaiNguyen01 opened this issue Dec 3, 2024 · 0 comments

Comments

@KhaiNguyen01
Copy link

I want to convert the upload file to base64, is there any way to do that?
I have tried to catch action 'sending' like this
*.component.html:
<dropzone [config]="config" (error)="onUploadError($event)" (success)="onUploadSuccess($event)" (sending)="onSending($event)">
*.component.ts:
onSending(event) {
const reader = new FileReader();
var self = this;
event[2].append({'custom_file': '12334'});
}
But the processing continue before the customfile was appended into event[2]

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

1 participant