mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #37] [Suggestion] Web static directory support #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FirTech on GitHub (Jun 12, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/37
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 on GitHub (Jun 12, 2022):
duf can serve static files.
I do not quite understand what you mean。
If your assets contains
img1.pngrun
duf assets, access it withhttp://localhost:5000/img1.pngrun
duf assets --path-prefix assets, access it withhttp://localhost:5000/assets/img1.png@FirTech commented on GitHub (Jun 12, 2022):
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
@FirTech commented on GitHub (Jun 12, 2022):
Oh, I got it, I just need to convert all the images to base64 and package them in the index.html file, disturb you.