-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How about add "delete file" feature? #397
Comments
Another Rust static file server with file deletion feature but less friendly UI: https://github.com/thecoshman/http. |
I have some time and would like to work on this. But first I have some questions regarding CLI flags. There are several options as I see it:
The later options allow more granular control, but it could be teetering on the edge of over-engineering. I personally like option 2 the most, because:
@svenstaro let me know what you think. |
I think option 2. does indeed sound reasonable. Would be happy if you wanted to take a stab at this. Should be fairly easy too. Make sure to use non-blocking deletion though as it can take a long time to recursively delete some stuff. |
Has this feature been completed? In what version can it be used? |
Not yet. My original plan was to work on it last month, but then I went on a family vacation, and immediately afterward got a new job. TLDR is I'm kind of busy now. I will likely get some spare time early June, so that'll likely be when I can produce a working prototype. |
@cyqsimon Ok, I see. Thank you very much ! |
Has this feature been completed? |
If I had a cent for every time I promised to do something then promptly forgot about it, Jokes aside, thanks for reminding me. Sometimes I do need some peer pressure to stop my procrastination. I've finished the prototype implementation today; please check out #1093. You can try it out like so: cargo run -- --rm-files -- <DIR> Note that in the current implementation, deletion is permanent. So it's probably a good idea to try it out on a temp dir. I'm not responsible for any of your data loss. |
Haha, thank you very much |
I also need this feature, is there any progress on the request? |
Yeah I kinda left it there after doing the initial implementation. There were definitely still a few problems (something to do with path escaping IIRC) so I'll need to add tests. At the moment I'm busier IRL than ever, so if anyone wants to help me write the tests that would be appreciated. See #1093. |
Notifying everyone that the feature is now complete with passing tests, awaiting feedback and review. Feel free to play around and try to break it. |
After I do some research on many mini http server, miniserve is a great work, which have authentication. But I also have found many mini http servers did not have "delete file" feature including miniserve.
I think "delete file" will be a good point to a mini http server, especially it can combine the authntication.
The text was updated successfully, but these errors were encountered: