sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
6.04k stars 301 forks source link

[Suggestion] Web static directory support #37

Closed 834772509 closed 2 years ago

834772509 commented 2 years ago

I tried to write a web page suitable for "duf" by myself. The main layout was referenced from h5ai, and it was packaged with Webpack, but the packaged pictures were scattered. Can Web Static Directory Support be Added? When the browser requests any file, it requests the files in the "assets" directory.

sigoden commented 2 years ago

duf can serve static files.

I do not quite understand what you mean。

If your assets contains img1.png

run duf assets, access it with http://localhost:5000/img1.png run duf assets --path-prefix assets, access it with http://localhost:5000/assets/img1.png

834772509 commented 2 years ago

For example, store "duf-src\assets\img1.png" in the "assets" directory of the "duf" source code, then you can access http://localhost:5000/img1.png

834772509 commented 2 years ago

Oh, I got it, I just need to convert all the images to base64 and package them in the index.html file, disturb you.