[Q] Usb file management via http?

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Facsi

Occasional Visitor
Is there a tool of some kind that i could use to upload files to USB drive by using http web page? I tried some scripts by creating an http webserver with lighttpd but it seems to have a 1MB file size limitation. any thoughts? I have no expertise with web dev...
 
Last edited:

RMerlin

Asuswrt-Merlin dev
Simplest ways are to use either FTP or SMB. Web-based file managers generally have pretty heavy resource requirements as they not only require a web server but also PHP, which might be problematic on a low performance device such as a router.
 

Facsi

Occasional Visitor
Thanks for the info, Merlin.
Would it be bad/difficult even for a simple page with only an upload form? for downloading it is enough to list the files in a page to download them (i can do this already).
 

ColinTaylor

Part of the Furniture
This is exactly what the router's AiCloud (Cloud Disk) feature does. Of course it's mainly intended for remote access but it works locally as well. If you don't want to allow remote access you'd probably have to write a script or something to block that.
 

dosborne

Very Senior Member
There are indeed *many* simple file management script out there that are simple to install and use, but do require a web server. Generally, they are not secure, but can work well on an internal network. Many years ago I used to use this sort of thing to manage my website from internal systems. Many web hosting companies also offer the capability. Generally, you just need to pick any 1 supported scripting (certainly not limited to just PHP). I doubt I can find the name of the one I used to use, but if I come across it I will post it. A quick Google search came back with thousands of options :)

Lighttpd is limited in many way, but some versions do allow setting overrides in a config file.

However, I would agree that in many cases a web server is overkill (unless you have one installed for other reasons) and SMB or similar is a better and simpler approach.
 

Facsi

Occasional Visitor
@colin aicloud from Asus does not work the way i need.

@dosborne that's more what i need. I don't know exactly what to search for. I wrote "file management HTTP upload script" on google. Most of them are PHP. Ill keep looking. I will return if i succeed or not.

Thanks all!
 

thelonelycoder

Part of the Furniture
@colin aicloud from Asus does not work the way i need.

@dosborne that's more what i need. I don't know exactly what to search for. I wrote "file management HTTP upload script" on google. Most of them are PHP. Ill keep looking. I will return if i succeed or not.

Thanks all!
That file upload thingie in the router UI would be a pretty handy function if it were built into amtm. Let me spend some time on figuring out if and how it can be done.
 

Facsi

Occasional Visitor
That file upload thingie in the router UI would be a pretty handy function if it were built into amtm. Let me spend some time on figuring out if and how it can be done.
Awesome! Would be great if somehow it is incorporated into "my addons" page.


@dosborne
I use lighttpd for very small webpages. i have to execute some php scripts for some of my tasks by pressing buttons.
 
Last edited:

dosborne

Very Senior Member
Pretty sure I used to use a Perl script. It was essentially built as a remote drop to a command prompt with a few things, such as uploading, added in.

Uploading in html/Perl even with lighttpd should be pretty straight forward.
Here is an example
 

dosborne

Very Senior Member
Found it. Very unsecure, for internal lan use only. You've been warned :)

Pastebin Perl code
 

JGrana

Senior Member
@thelonelycoder never mind about my recommendation for tinyfilemanager...
I installed it on my AX88u. Ran quite well - download, upload, view, copy, move.
But, as @RMerlin warned, it uses PHP (and lightttpd). It was consuming ~4% of my memory.
I even saw swapping! I had not seen swap usage for many months.
 

Facsi

Occasional Visitor
@dosborne thanks.
Just adding some ideas for all, would be nice to have a my addons page that user could link his scripts, sh or whatever creating a list and execute each of them with a single button click.
 

thelonelycoder

Part of the Furniture
@dosborne thanks.
Just adding some ideas for all, would be nice to have a my addons page that user could link his scripts, sh or whatever creating a list and execute each of them with a single button click.
That's what SSH is for. Apart feom that, the built in Asus webserver does not allow to directly interact with the routers shell.
 

Facsi

Occasional Visitor
That's what SSH is for. Apart feom that, the built in Asus webserver does not allow to directly interact with the routers shell.
I see... my point was that its easier to access the webpage via browser than SSH. And ssh you still have to write commands in shell (think with smartphone access). Of course, all i was proposing here is for internal use only. I'm a home user. no access via Wan, etc. That's how i do my scripts execution with lighttpd.
 
Last edited:

Facsi

Occasional Visitor
@dosborne
Thanks but it didn't work. i guess it works for small files only. 30MB+ does not work. Error 500 after a while when uploading. Router does not handle as Merlin said.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top