Questions tagged [fileserver]
278 questions
838
votes
33 answers
Node.js quick file server (static files over HTTP)
Is there Node.js ready-to-use tool (installed with npm), that would help me expose folder content as file server over HTTP.
Example, if I have
D:\Folder\file.zip
D:\Folder\file2.html
D:\Folder\folder\file-in-folder.jpg
Then starting in D:\Folder\…

Paul Verest
- 60,022
- 51
- 208
- 332
28
votes
2 answers
Lightweight Localhost File Server for Mac
Is there a super lightweight file server that I could use for development on my mac?
I'm imagining something like:
> cd somefolder
> run server
...running static file server at http://0.0.0.0:2343...
It's only for development of static…

bendytree
- 13,095
- 11
- 75
- 91
21
votes
4 answers
Serving files stored in S3 in express/nodejs app
I have app where user's photos are private. I store the photos(thumbnails also) in AWS s3. There is a page in the site where user can view his photos(i.e thumbnails). Now my problem is how do I serve these files. Some options that I have evaluated…

Saransh Mohapatra
- 9,430
- 10
- 39
- 50
16
votes
1 answer
Serving static files from alternate path in embedded Jetty
I'm trying to create an embedded jetty server with both a custom servlet that serves some dynamic data, and default servlet that will serve some images. I have the custom servlet working, but I can't figure out how to add a default servlet to serve…

user3034643
- 163
- 1
- 1
- 6
11
votes
3 answers
Uploading files to file server using webclient class
Currently I have an application that receives an uploaded file from my web application. I now need to transfer that file to a file server which happens to be located on the same network (however this might not always be the case).
I was attempting…

JustLogic
- 1,738
- 2
- 12
- 24
10
votes
1 answer
http.FileServer response with wrong mime "Content-Type"
I'm using http.FileServer to serve a directory of mp3 files, which my template then src in javascript. The response, however, uses the Content-Type text/html instead of audio/mpeg. How do I set the mime type which the FileServer responds with, I saw…

Nevermore
- 7,141
- 5
- 42
- 64
9
votes
3 answers
How to create a simple html server using express js
I'm new in node.js I want to create a simple express.js static file server, but I have some issues.
I have been installed express.js 4.2 globally like this:
npm install -g express-generator
I have this code in httpsrv.js:
var http =…

Zsoca
- 358
- 1
- 5
- 16
9
votes
1 answer
Configure an OWIN static file server at a specific route prefix
I'm experimenting with keeping my content in non-default locations (eg in bower_components or /packages/../tools). As part of the experiment I am trying to set up an asp.net mvc 5 application where hitting a certain route allows me to browse files…

George Mauer
- 117,483
- 131
- 382
- 612
7
votes
7 answers
Separate file server for a php website
I have two servers for a website. One server will have php code and database and another less speed server to store files only. I need to implement these in a way that file uploaded through the website must store at another server and also then can…

phpian
- 901
- 3
- 13
- 21
7
votes
3 answers
Image Uploads - CDN, MongoDB, or NFS?
I have an admin type system for a website with multiple web servers where users can configure pages and upload images to appear on the page (kind of similar to a CMS). If you already have a MongoDB instance with replica sets setup, what is the…

Bradford
- 4,143
- 2
- 34
- 44
7
votes
1 answer
Good way to disable directory listing with http.FileServer in Go
If you use the http.FileServer in Go like:
func main() {
port := flag.String("p", "8100", "port to serve on")
directory := flag.String("d", ".", "the directory of static file to host")
flag.Parse()
http.Handle("/",…

Tobias
- 924
- 9
- 23
7
votes
1 answer
How to serve static files with basic authentication?
I cannot make basic authentication work with http.FileServer using github.com/abbot/go-http-auth.
package main
import (
"fmt"
"log"
"net/http"
"github.com/abbot/go-http-auth"
)
func Secret(user, realm string) string {
users :=…

jgran
- 1,111
- 2
- 11
- 21
6
votes
0 answers
Force browser use partial content to download large file
My server hosts large files to download (the files may stored in different file severs but not in the web server). My intention is to let browser use partial download so that the web server can fetch the small piece of the file instead the whole…

Alexander Chen
- 417
- 3
- 17
5
votes
1 answer
Go http.FileServer gives unexpected 404 error
I'm trying to run two file servers, one of them serving index.html in the ui folder, and one other serving some other static files, like the code below:
package main
import (
"log"
"net/http"
)
func main() {
srv := http.NewServeMux()
…

Arsham Arya
- 1,461
- 3
- 17
- 25
5
votes
4 answers
How to find out the URL of a file when uploaded with Filezilla
Dear Stackoverflow users,
I would like to know how to find out the URL of a file after it has been uploaded to a file server, so that I can view it in ex. safari.

Toby van Kempen
- 1,447
- 4
- 13
- 20