最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - using blob or base64 which is more efficient for uploading - Stack Overflow

programmeradmin10浏览0评论

we are using cropit for cropping image at client side then uploading base64 string to server , but some time for large images it crashes mobile browsers with low ram , is it good idea to convert base64 to blob [Creating a BLOB from a Base64 string in JavaScript then upload that on server or it will effect more mobile users as first image will be covered to based64 for cropping and then back to blob .

we are using cropit for cropping image at client side then uploading base64 string to server , but some time for large images it crashes mobile browsers with low ram , is it good idea to convert base64 to blob [Creating a BLOB from a Base64 string in JavaScript then upload that on server or it will effect more mobile users as first image will be covered to based64 for cropping and then back to blob .

Share Improve this question asked May 2, 2020 at 2:48 AlexAlex 1111 silver badge12 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Base64 encoding takes up about a third more space than the original data. It was designed to safely send data through text (e.g. in mail bodies).

You're better off using the binary image, as it will be smaller and so quicker to upload.

Go with BLOB, mate.

发布评论

评论列表(0)

  1. 暂无评论