我有一个简单的 Android 应用程序,它从相机拍摄照片,然后将图像转换为 Base64 字符。然后我将这个String发送给一个webservice,webservices将这个Base64转换成一个二进制文件,然后图像最终保存在服务器上。
然而,它适用于小图片,但我想这对视频或高分辨率图像来说是不可能的。
你们知道极限在哪里吗?我想这与您可以通过请求的参数发送多少个字符直接相关,但找不到任何相关信息。
最佳答案
如果您阅读以下标准,您会发现不应该有限制,但 Web 服务器可能有(引自此处 http 1.1 )
The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle
据我所知,apache 的 GET 请求长度限制为 4000 个字符
对于 POST 不应该有任何限制
关于php - 我可以通过 POST/GET 发送多少字节?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17502182/