Following are the HttpServletResponse header and content type used to send a file. Upto 32MB of data is passed to the client, but my whole data is of 100MB size.
以下是用于发送文件的HttpServletResponse标头和内容类型。最多32MB的数据传递给客户端,但我的整个数据大小为100MB。
response.setContentType("application/octet-stream");
response.setHeader("Transfer-Encoding", "chunked");
response.setHeader("Content-Disposition", "attachment; filename="filename.bin");
I can't store this data to cloud storage as this would be created per user.
我无法将此数据存储到云存储中,因为这将根据用户创建。
Does this can be achieved through HttpServletResponse? or I need to move to some other method, say sockets etc.
这可以通过HttpServletResponse实现吗?或者我需要转向其他方法,比如套接字等。
Please recommend a method for multi client environment.
请为多客户端环境推荐一种方法。
2 个解决方案
#1
1
App Engine has quotas, designed to protect everyone from runaway applications. The maximum amount of data your application can receive in a single inbound HTTP request is 32MB.
App Engine具有配额,旨在保护每个人免受失控的应用程序的侵害。应用程序在单个入站HTTP请求中可以接收的最大数据量为32MB。
If you want to upload larger files then you should look at Blobstore API.
如果您想上传更大的文件,那么您应该查看Blobstore API。
See the quota documentation for more details.
有关详细信息,请参阅配额文档。
#2
1
You cannot get around the 32mb limit on requests. Your best bet is to push the data to GCS, and generate a signed URL.
您无法绕过32mb的限制请求。您最好的办法是将数据推送到GCS,并生成签名的URL。
Depending on what you need to do to generate your 100mb file, you may need to offload the whole process using the task queue to prevent request timeouts.
根据生成100mb文件需要执行的操作,您可能需要使用任务队列卸载整个过程以防止请求超时。
#1
1
App Engine has quotas, designed to protect everyone from runaway applications. The maximum amount of data your application can receive in a single inbound HTTP request is 32MB.
App Engine具有配额,旨在保护每个人免受失控的应用程序的侵害。应用程序在单个入站HTTP请求中可以接收的最大数据量为32MB。
If you want to upload larger files then you should look at Blobstore API.
如果您想上传更大的文件,那么您应该查看Blobstore API。
See the quota documentation for more details.
有关详细信息,请参阅配额文档。
#2
1
You cannot get around the 32mb limit on requests. Your best bet is to push the data to GCS, and generate a signed URL.
您无法绕过32mb的限制请求。您最好的办法是将数据推送到GCS,并生成签名的URL。
Depending on what you need to do to generate your 100mb file, you may need to offload the whole process using the task queue to prevent request timeouts.
根据生成100mb文件需要执行的操作,您可能需要使用任务队列卸载整个过程以防止请求超时。