<div dir="ltr"><div><div><div>Hello!<br><br></div>I need to work out a big file uploader. Files could be around ~300Mb.<br><br></div><b>Toolchain:</b><br><ul><li>OS: Linux kuszidell 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18 CET 2015 x86_64 GNU/Linux
running Pharo<br></li><li>Pharo4.0,
Latest update: #40626</li><li>Loaded config: KomHttpServer (HernanMoralesDurand.25)</li><li>Loaded config: Seaside3 (topa:278)</li><li>Seaside Adaptor: WAComancheAdaptor on 8080</li></ul><p><b>Results:</b><br></p><ul><li>When working locally, even 153 MB file is uploaded in seconds.</li><li>Pharo grows in memory with each upload (haven't seen any degradation
yet). This is also a situation when uloading locally (localhost:8080)<br></li><li>Received file (ByteArray) is held in memory when receiving (checked with halt/inspect). <br></li></ul>However, when running on the <b>final configuration</b>:<br><ul><li>IIS7.5 on Windows Server 2008R2 as reverse proxy with ARR and Rewrite IIS "plugins"</li><li>VPN connection from IIS box to the Linux box with Pharo, see above</li></ul><p>The following effects realized:</p><ul><li>Upload process goes well, no error. However, sometimes the resulting file wouldn't appear in the target directory (??). No error in Pharo as well. Disappears (hmm?). <br></li></ul></div><div><u><b>Questions:</b></u><br><ul><li>are there<b> any timeout settings</b> in Seaside and/or in Comanche? Especially on transfers, etc. Session timeout could be short, if any... The main difference between the local and final config/setup is the network/transfer speed (VPN is very slow).</li><li>Is there an <b>option for streaming directly the uploaded file</b> into a target file?</li></ul></div><div><br><br><u>Uploading "software" is as easy as this:</u><br><br><b>renderContentOn:</b> html<br>html form multipart;<br> with: [<br> html fileUpload
callback: [ :value | self receiveFile: value ].<br> html submitButton: 'Upload' ].<br><br><b>receiveFile:</b> aFile<br> | stream |<br>stream := (FileDirectory default directoryNamed: '/home/kuszi/tmp')
assureExistence;<br> forceNewFileNamed: aFile fileName.<br>[ stream binary; nextPutAll: aFile rawContents ]
ensure: [ stream close ]
<br><br><br><br><br>Thanks and best regards<br></div><div>Robert<br><br></div><div><br><br><br><br><br><br><br><br><br><br><br></div><br></div>