2

I need something like FileStream class in Adobe AIR, but needs to work in Flash Player. I know there is FileReference#save(), but it can only save the whole file at once, which does not work if the size of the data to be saved is larger than the available memory... Is it really not possible to stream data to a local file to avoid keeping the whole data in the memory? Or maybe it is possible to append data to a local file without first reading the whole file into memory?

I need this badly! Thanks!

4

2 回答 2

1

你运气不好。安全限制不允许这种情况发生在 AIR 应用程序的上下文之外。

于 2009-06-01T14:01:35.567 回答
0

如果您要访问服务器,则可以通过将数据传递给服务器来实现。

使用 FileReference.save() 并点击服务器上的某个 URL。然后,开始将要保存的数据流式传输到服务器,然后让服务器将其重定向到 Flash 客户端。您需要在服务器上编写一些自定义的处理方式,而且速度不会像在本地保存那样快,但这可能是您能够做到这一点的唯一方法。

于 2009-06-01T16:01:25.220 回答