Uploading/Downloading stability

Chipp Walters chipp at chipp.com
Fri Apr 15 05:38:44 EDT 2005


Hi Richard,

That's an interesting problem. I think I would approach it on two 
fronts: the server side and the client side. I'll describe the download 
method, you would reverse for upload.

On the server side, I would break-up the file into smaller 
chunks..perhaps use a Rev CGI to do it. Just read the whole binary file 
into memory, binhex it, break it up into 30K chunks, and gzip those to a 
folder with a unique naming sequence. Then create a checkSum for each 
file and store it in a small text file.

Then I'd just do 'get URL' from RR, download the text file, read the 
checksums and filenames, and begin to download one after the other, 
making sure the checksums match. Once they're all downloaded, then 
combine them, and spit out the final 2Mb file.

Not all that hard, just tedious. For upload, you may need to use 
multipart encoding. Or, if you're posting to a Rev CGI, you could do it 
with simple form data.

hope that helps,

-Chipp

Richard Miller wrote:
> (Sent this post yesterday. No replies yet. Someone's bound to have some 
> feedback on this issue, so I'm trying again)
> 
> My Rev program needs to upload and download a file of roughly 2 MB in 
> size 3-8 times every 30 minutes via a wireless connection. This wireless 
> connection is through the built-in airport card in an IBook. Sometimes 
> this connection is received via a wired DSL or cable modem (and wireless 
> router), but sometimes it feeds off a Powerbook connected to the net via 
> a Verizon 3G PCMCIA card (using Apple's Internet Sharing capabilities).


More information about the use-livecode mailing list