Re: Sierra server, upload file size
Re: Sierra server, upload file size
- Subject: Re: Sierra server, upload file size
- From: Stavros Panidis <email@hidden>
- Date: Fri, 03 Mar 2017 05:54:56 +0200
Dear Mark,
Many thanks. This solved my problem.
Stavros On 1 Mar 2017, at 20:36, Louis M Fisher III < email@hidden> wrote:
Stavros,
You said:
Regarding fileUpload form I use
<wo:fileUpload data = "" filePath = "$imagepath" mimeType = "$mimeType" />
Using fileUpload in this way is problematic because it uses a NSData object on the server to store the file - the entire file needs to be stored in memory before it can be written to disk. It is common to run into out of memory errors in the scenario.
Take a look at the documentation for fileUpload here:
A better method is to use "streamToFilePath" which will stream your file to the server using a 512KB buffer and not store it all in memory.
WOFileUpload {
filePath=aPath;
data="">
[inputStream=fileName];
[bufferSize=sizeKB];
[outputStream=fileName];
[streamToFilePath=filePath];
[overwrite=[ boolean ]];
[finalFilePath=filePath];
}
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden