Skip to content

TypeError: file.bytes is not a function exception on file uploaded #2

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

Closed
Dodo9128 opened this issue Oct 2, 2024 · 2 comments
Closed

Comments

@Dodo9128
Copy link

Dodo9128 commented Oct 2, 2024

Hello
I was very impressed with your wonderful service

An error is currently occurring when uploading the image.

Is there a limited format of files that can be uploaded?
I tried to upload a file in png format

thx

스크린샷 2024-10-02 오전 11 17 11
스크린샷 2024-10-02 오전 11 17 18

@zhengkyl
Copy link
Owner

zhengkyl commented Oct 2, 2024

Thanks for reporting this error!

It turns out file.bytes() is supported by Firefox and Safari, but not Chrome. I have changed that code to work in all browsers. https://developer.mozilla.org/en-US/docs/Web/API/Response/bytes

It should work now, png, jpg and svg should all be supported.

@Dodo9128
Copy link
Author

Dodo9128 commented Oct 2, 2024

I made sure the feature works correctly! Thank you for your quick response🤩

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

2 participants