I have seen the referenced Silverlight upload sample many times on this site and elsewhere, but I have a question whether or not It's really safe.
Quick review: This code is uploading "AIXX handler". UploadFileChunk () uses OpenWriteAsync and an OpenWriteCompletedEventHandler to instantiate a WebClient and send some bits from a file. WebCLient communicates with the two string string parameters using a URR with the parameter: "filename" and "append". After writing bits in fragments of the output stream of WebClient, the event handler checks to see that all the bits are sent, and if it does not call UploadFileChunk () again to send another part.
Server side, handler is simple - write bitmate disk using a filestream, adding it to append = 1 and creating new when creating id = 0.
This is very likely to be the result of architecture problems. Is the server guaranteed to write bits and close the filestream, before it receives the next request and bits the next part? My understanding of OpenWriteCompletedEventHandler on the Silverlight side is that when you finish the writing process and close the stream, this does not mean that the bits have been sent to the wires yet, processed by the server-side handler alone. Used to be. / P>
Thanks!
If you have any concerns about uploading large files (I have seen very large files With problems report), try a Silverlight Open Source File Uploader for Free
Comments
Post a Comment