admin管理员组文章数量:1403438
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 badges1 Answer
Reset to default 7Base64 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.
本文标签: javascriptusing blob or base64 which is more efficient for uploadingStack Overflow
版权声明:本文标题:javascript - using blob or base64 which is more efficient for uploading - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744390924a2603976.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论