本文介绍了在 Silverlight 中上传大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Silverlight 中上传大文件而无需采用分块上传"或将所有文件数据加载到内存中?

Is it possible to upload large files in Silverlight w/o resorting to the "chunked upload" or loading all of the file data into memmory?

我阅读了一些关于使用 Silverlight 流式 API 上传的内容,这是否有效,并且它是否会真正流式传输数据而无需预先将所有数据预加载到 mem 中?

I read something about uploading using Silverlight streaming API, does that work and will it truly stream the data w/o preloading all of it in mem upfront first?

推荐答案

Silverlight 没有实现任何类型的流上传".在发布请求到达服务器之前,您要发送的所有数据都应写入流中.因此,如果您需要发送真正的大文件,我会说多个带有传输编码:分块"(即分块上传)的帖子是要走的路.

Silverlight doesn't implement any kind of "stream upload". Before post request goes to the server all data you want to send should be writen into the stream. So if you need to send truly large file I would say multiple posts with "transfer-encoding: chunked" (i.e chunked upload) is the way to go.

这篇关于在 Silverlight 中上传大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 13:46