search

Home  >  Q&A  >  body text

java - 用post方法上传,base64编码的图片,由于图片太大,后台接受的时候总是为null?

图片用iPhone拍摄的,所以打给2m左右,后台接收的时候总是null,但是换成一个小点的图片,就可以正常接受。

巴扎黑巴扎黑2803 days ago827

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 18:03:45

    If you are using tomcat, the default request parameters cannot exceed 2M. It is recommended to use multipart/form data to transfer files instead.

    reply
    0
  • 迷茫

    迷茫2017-04-17 18:03:45

    You can upload it to CDN first, and then return the URL on the CDN to the backend.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 18:03:45

    To add to the above, I have never used java, but PHP also has restrictions on the size of form uploads. The configuration file needs to be modified. I don’t know if java is available

    reply
    0
  • Cancelreply