You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Maxime LUCE <ma...@touchify.co> on 2014/06/20 20:32:47 UTC

CB-6994 - Windows 8 does not save big file transferred using Blob

Hi everybody,

I just create an issue and its associated pull request for File Plugin in Windows 8.

When trying to save Blob using FileWriter.write method, if the blob's size is too high, we get a stack overflow exception during the conversion of the blob into an basic array.
WinRT (WinJS) provide a method to write Blob directly to the filesystem. It uses Streams so it's safe for memory.

In the pull request we avoid the conversion of the Blob to ArrayBuffer and from ArrayBuffer to plain Array and we pass the blob directly to the FileProxy.
In the FileProxy we use a specific method which saves the Blob to the file system by using a safe Stream method.

More info at :
http://code.msdn.microsoft.com/windowsapps/Blob-Sample-0e35889e/sourcecode?fileId=43594&pathId=962515806
Method : writeBlobToFile

Please review this fix and merge.

Thanks

--------------------------------
Maxime LUCE
Touchify - CEO
+33 6 28 60 72 34 | +1 415 481 9965
maxime@touchify.co<ma...@touchify.co> | http://touchify.co


Re: CB-6994 - Windows 8 does not save big file transferred using Blob

Posted by Jesse <pu...@gmail.com>.
Saw it, thanks Maxime!

@purplecabbage
risingj.com


On Fri, Jun 20, 2014 at 11:32 AM, Maxime LUCE <ma...@touchify.co> wrote:

> Hi everybody,
>
> I just create an issue and its associated pull request for File Plugin in
> Windows 8.
>
> When trying to save Blob using FileWriter.write method, if the blob's size
> is too high, we get a stack overflow exception during the conversion of the
> blob into an basic array.
> WinRT (WinJS) provide a method to write Blob directly to the filesystem.
> It uses Streams so it's safe for memory.
>
> In the pull request we avoid the conversion of the Blob to ArrayBuffer and
> from ArrayBuffer to plain Array and we pass the blob directly to the
> FileProxy.
> In the FileProxy we use a specific method which saves the Blob to the file
> system by using a safe Stream method.
>
> More info at :
>
> http://code.msdn.microsoft.com/windowsapps/Blob-Sample-0e35889e/sourcecode?fileId=43594&pathId=962515806
> Method : writeBlobToFile
>
> Please review this fix and merge.
>
> Thanks
>
> --------------------------------
> Maxime LUCE
> Touchify - CEO
> +33 6 28 60 72 34 | +1 415 481 9965
> maxime@touchify.co<ma...@touchify.co> | http://touchify.co
>
>