pqina / filepond-plugin-file-encode

🗜 Send FilePond Files Along with Form Submit
https://pqina.nl/filepond/
MIT License
13 stars 12 forks source link

Encode plugin not working with server option #18

Closed bilalmalkoc closed 3 years ago

bilalmalkoc commented 3 years ago

Describe the bug getFileEncodeBase64String method returns an error when using server option in FilePond. If i remove server option, everthing works fine.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/js-uzqmrn?file=index.js
  2. Click on Crate Uploder button.
  3. Look console.
  4. See error.
rikschennink commented 3 years ago

Why do you want to use file encoding and the server property at the same time?.

bilalmalkoc commented 3 years ago

Because i am editing images with TUI. So i need to access encoded image string for edit image.

rikschennink commented 3 years ago

In that situation I advise not loading the file-encode plugin as it is intended for uploading files as base64 strings.

Better to get the file object and then convert it to base64 manually before sending it to TUI. See article below on how to convert files to base64.

https://pqina.nl/blog/convert-a-file-to-a-base64-string-with-javascript/

Obviously I'd love to know whyyou went with TUI instead of Doka Image Editor, is there any feature you're missing?

bilalmalkoc commented 3 years ago

OK. I will use manual way to get encoded string. Thanks.

Doka is better but, i am using image editor in my commercial product. And Doka's license price is equal with my yearly sales.

rikschennink commented 3 years ago

Thanks for the insight @bilalmalkoc, and good luck with your product!

I'll close the issue.