Base64 image upload VS Binary image upload?

前端 未结 2 1020
难免孤独
难免孤独 2020-12-29 21:22

I want my mobile application to be able to upload an image to my server, in my case it\'s a Rails 3.2.11 with nginx.

I read alot ab

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 22:03

    'Why not just use binary upload with multipart headers on the http request?' indeed why not ;)

    Base64 image representation can be directly placed within html to render an image.

    Binary takes up less space. And benefits from greater network effects and standardization. E.g. if you want to use amazon simple secure storage S3 you have to store a binary file. You can't store a string you would need a key/value store e.g. redis.

提交回复
热议问题