HTTP File Upload Demo
Mike G
Posts: 2,702
Here's the demo.
http://spinneret.servebeer.com:5000/upload.htm
Some rules:
Please make sure you use 8.3 file names. I have some validation.
File size is limited to around 740 byte text files. I know... but this is just a demo.
Try dropping a simple html file.
Edit: to see the file in the uploads directory, click the Get Files link in http://spinneret.servebeer.com:5000/uploads/index.htm. Time for a beer!
http://spinneret.servebeer.com:5000/upload.htm
Some rules:
Please make sure you use 8.3 file names. I have some validation.
File size is limited to around 740 byte text files. I know... but this is just a demo.
Try dropping a simple html file.
Edit: to see the file in the uploads directory, click the Get Files link in http://spinneret.servebeer.com:5000/uploads/index.htm. Time for a beer!
Comments
BELGIUM.TXT
BELGIUM.HTM 376bytes
I can see from others:
INDEX.HTM
HPOST.TXT
LUCIE.TXT
HELLO.HTM
Yes, Yes,Yes ....
Safari 5.0.5 (in osx 10.5.8 PPC)
And No it still not work .....
I can select file on my desktop, and do submit .... but nothing on index.
OBC
My first reaction, "Gosh darnit [well, something like that] are you kidding me!, really!" Well, I gota' click the VIRUS.HTM see what's it's all about.
I'll check the log and see if I can see what's up with Chrome. I thought I tested Chrome a few weeks ago and it is was working.
OBC
OBC
Dutch language ....
Is there somebody also use a non english os ?
When y try to upload, the response is " No file selected" but when I select my file , it appears on the window.
My upload code is not picking up the Content-Type: multipart/form-data; boundary= header or there's some kind of formatting that I'm not handling. I seems to be MAC/Safari related. A friend of mine was able to submit a file via FireFox on a MAC but not Safari. I can submit a file using Safari on a PC. I don't have a MAC so it's a little hard to troubleshoot. Anyway, I'm not seeing a log entry for the MAC stuff. So, I set the logger to append any time it sees an "upload" request regardless of the method.
Sorry it is just for you debuging, not waist your time ....
I'm having problems with the binary upload. Honestly, I don't feel like messing with this anymore this weekend. OBC, I hope you don't mind waiting a little longer.
http://spinneret.servebeer.com:5000/upload.htm
:-)
Spinneret programmers, the MAC (osx 10.5.5 ppc Safari 5.0.5) sends the initial POST request with out body data. You must continue to read the input stream until the body byte count equals the content-length header value. I was thrown off because every browser I tested on a PC contained body data in the initial POST request.
Can you make a variation of your program that would boot another Propeller from a downloaded file via a Spinneret serial port?
Thanks.
--Steve
1) Upload a binary to the Spinneret remotely. 2) Shot the uploaded binary to a second Propeller via a serial connection. 3) Load the binary and reboot the second Propeller.
Something like that. I was thinking upload to the server, which downloads to the target Propeller using serial port and start it up. Writing to EEPROM is probably not necessary but may be useful for some. Later we may want to just put it on the SDcard in a predetermined place, release control of the SDcard, and then yank the target's reset pin briefly.
I just finished testing a binary upload console application so I can save a Propeller binary or eeprom file on the Spinneret for firmware updates. It has rudimentary authentication and file integrity checking.
Chip posted a Spin program for loading a propeller from a propeller here:
http://forums.parallax.com/showthread.php?86311-Propeller-Loader&p=591445&viewfull=1#post591445
I'll get working on it.
I can load a program that fits in run-time memory. I'm not sure about a full blown 32K.
OBC
That's pretty sweet that you can get the Spinneret to boot another Propeller from a binary on the SD card . I could totally see the applications of loading specialized images for different situations.
If you wanted, you could also use Kwabena's SD Card object to boot a binary off the SD card into the Spinneret's Propeller (even a full 32KB image). Check the method "PUB bootPartition(filePathName)" in his "S35390A_SD-MMC_FATEngine.spin" object. You can get it out of the zip file here:
http://www.parallaxsemiconductor.com/an006
That would let you upload new firmware to the SD card, then have the web server reboot itself with a new application image. His method only boots into RAM, I believe - it doesn't copy into EEPROM. That might be good for failsafe firmware?
Anyway, Jazzed came along and asked if I could program another Prop and I though hmmm.
The .net code and SPIN code base
http://forums.parallax.com/showthread.php?132562-Program-a-Propeller-with-the-Spinneret
http://www.agaverobotics.com/spinneret/source/
Site
http://spinneret.servebeer.com:5000/