Yan78/webduino

Webduino + SD-card = file manager

Closed this issue · 6 comments

Hi, I'm misusing this to send you something that might be of interest; I 
combined SDFatlib and modified webduino so I can upload files to the SD card 
and serve files from the SD card. 
I attached the sketch and two files that can be put on the SD card to get a 
file manager that can upload files, delete files, create and delete folders, 
navigate folders, etc.

Reason for sending it to you is that -while this works-, I'm not a particularly 
good C++ programmer and the code might (will!) need some serious reviewing and 
improving before spreading it to a larger audience.

If you're interested in doing so, let me know, if not, I'll just post it in the 
general Arduino forum 

Some of the changes I had to make to the webduino lib:

changed: int m_pushback[100] instead of char.   Otherwise binary files will 
fail to load.  Related variables were also changed. 

added: int WebServer::readNextFormPart(int action)    reads sections of 
multi-part forms.   The action tells it what to look for and what to return.    

changed: void WebServer::processHeaders();  added sections where it reads the 
multipart-form boundary and filenames.

In order to get everything working, you'll have to change the SD_SELECT to the 
correct pin (I believe 4 on the new arduino ethernet shield).
You'll probably also have to set the correct IP Address.

Improvements that are still needed:
- Speed...   Serving files works, but it's pretty slow sometimes.  Also, if a 
browser sends multiple requests, for instance when a css, image or javascript 
file also needs to be served, everything slows down badly.

File uploads are pretty slow as well.   I'm not sure if changing/ adding 
buffers helps.  I'm also not sure where the bottleneck is. My code / webduino / 
ethernet lib / SPI lib / W5100 chip...?

It might be nice to have a send buffer in Webduino, so it doesn't try to send 
each byte at a time when data is written byte-to-byte to the server. I tried 
solving this by adding some buffers myself, but that could be implemented much 
nicer.   Some sort of flush function would have to be added to send all bytes 
that are still in a buffer.  

Regards
Matthijs



Original issue reported on code.google.com by matthijs...@gmail.com on 20 Oct 2010 at 2:46

Attachments:

I removed the Flash lib dependencies, that might cause some troubles.  Also, 
The code has only been tested on Arduino 0019

Original comment by matthijs...@gmail.com on 20 Oct 2010 at 3:24

Attachments:

Original comment by ben.combee on 2 Nov 2010 at 2:12

  • Changed state: Accepted
Very nice application, but not something we're merging into the main code at 
this time.

Original comment by ben.combee on 9 Jan 2012 at 4:59

  • Changed state: WontFix
I want to know about this application.

I'm a newbie and I want to compile with Arduni ide 1.5.6 r2
My Arduino is a Mega2560 with Ethernet Shield with microSD

Library installed the version 1.7 available from 
https://github.com/sirleech/Webduino.

Then compiling say:

conflicting return type specified for 'virtual void WebServer::write(uint8_t)'

I appreciate your time and attention.

Original comment by rip...@gmail.com on 24 Jul 2014 at 9:17

This is not a forum for tech support, but a place to file bugs.  And even then, 
bug tracking has moved to the GitHub repo.

Original comment by ben.combee on 24 Jul 2014 at 9:28

does not work, poor arduino - not even file management is possible

Original comment by sme...@gmail.com on 2 May 2015 at 5:50