aboutsummaryrefslogtreecommitdiffstats
path: root/src/file_op.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-03-07Upgrade to Rust 2024 editionSven-Hendrik Haase1-4/+6
2025-03-02feat: validate temp dir exists through `value_parser` and fixed clippy issuesAlec Di Vito1-18/+32
2025-02-22feat: address comments; add in new argument (`temp-directory`); add comments ↵Alec Di Vito1-43/+103
to upload code; add tests
2025-02-17feat: implement temporary file uploads and tweak mobile designAlec Di Vito1-27/+113
2024-07-20Bump depsSven-Hendrik Haase1-7/+11
2024-06-06feat: Added HTML and Javascript progress bar when uploading filesAlec Di Vito1-5/+13
2024-01-29Refactor errorscyqsimon1-36/+30
- Split `ContexualError` into `StartError` & `RuntimeError` - Made sure every `RuntimeError` variant has an accurate status code
2024-01-26Fix inaccurate uses of `sanitize_path`cyqsimon1-3/+4
2024-01-13Use tokio::fs instead of std::fs to enable async file operations (fixes #445)Sven-Hendrik Haase1-8/+9
2024-01-13Fix formattingSven-Hendrik Haase1-8/+14
2024-01-11Ignore readonly metadata and handle errors insteadVictor1-11/+15
2024-01-03Update actix-multipart to 0.6.1Sven-Hendrik Haase1-2/+2
2023-09-05Fix incorrect usage of app data extractorcyqsimon1-1/+1
- `Data` extractor can only be used when app data is wrapped with `Data`
2023-09-05Minor code style refactorscyqsimon1-9/+11
2023-09-05Use distinct query type for file op APIscyqsimon1-9/+12
2023-09-05rename `file_upload` to `file_op`cyqsimon1-0/+2
- This is in preparation for adding deletion code
2023-09-05Rewrite `contains_symlink`cyqsimon1-8/+20
2023-07-10Create shared file utiity modulecyqsimon1-85/+2
2022-09-20Tidy up some importsSven-Hendrik Haase1-3/+4
2022-09-19Return 403 instead of 500 for upload errsJonas Diemer1-3/+1
2022-09-18cargo fmtJonas Diemer1-6/+8
2022-09-18sanitize allowed upload paths for cases like ./dirJonas Diemer1-1/+1
2022-09-18clarity of commentJonas Diemer1-1/+1
Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
2022-09-18Update src/file_upload.rsJonas Diemer1-1/+1
Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
2022-09-18Renamed option for more clarityJonas Diemer1-3/+2
2022-09-18cleaned up code using any()Jonas Diemer1-11/+5
2022-09-18Switched to use of PathBuf, fixed for subdirsJonas Diemer1-3/+8
2022-09-18Added option restrict-upload-dirJonas Diemer1-0/+13
2022-06-26Create directory (#781)Sheepy1-16/+122
* Add ability to make directory Frontend for making directories Fix potential security vulnerability (CWE-23) Add tests Update README.md Disallow using parent directories altogether Fix formatting Fix clippy warnings Address review comments Update README.md Change `making` to `creation` Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com> Have make directory flag require file upload flag Address review comments * Disallow uploading files and making directories through symlinks when disabled * Add test * Clippy formatting changes * Add test doc comment
2021-12-28Bump actix-web to v4.0-beta.15jikstra1-9/+6
Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-09-04Adress review commentsAli MJ Al-Nasrawy1-2/+39
2021-09-01file_upload.rs: sanitize path inputAli MJ Al-Nasrawy1-10/+42
Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-30Fix clippy::too_many_arguments and rework error ..Ali MJ Al-Nasrawy1-142/+25
... page rendering Too many arguments are moved around and many of them are already stored in MiniserveConfig. Many of these are used to render error pages. To fix this issue, it was necessary to rework error page rendering: 1. Implement `ResponseError` for `ContextualError` so that it can be returned from service handlers as is and will then be automatically logged to the console and converted into an error response. 2. At service handler level, all error responses are now rendered as plain text. 3. 'error_page_middleware' is now responsible for the rendering of the final error page from plain text reponses. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-28file_upload.rs: use async/awaitAli MJ Al-Nasrawy1-133/+100
... and rewrite {save_file, handle_multipart} ... and fix clippy warning about create_error_response() being always Ok()
2021-08-28migrate to actix-web v4.0-betaAli MJ Al-Nasrawy1-1/+1
2021-06-28Fix lintsSven-Hendrik Haase1-2/+2
2021-03-28Refuse to start without explicit path if not attached to interactive terminalSven-Hendrik Haase1-3/+1
2021-03-01Fix clippy warningTamas Levai1-0/+1
2021-02-28Add program version footerTamas Levai1-0/+7
2021-02-19Fix lintsSven-Hendrik Haase1-5/+5
2020-10-01restore default theme cli option and add default theme dark optionLukas Stabe1-0/+17
2020-09-26move css out of html into its own routeLukas Stabe1-0/+7
2020-09-25[wip] client-side color-scheme handlingLukas Stabe1-15/+0
2020-09-24Add embedded favicon (fixes #364)Sven-Hendrik Haase1-0/+7
2020-07-21Update to actix 2 and futures 0.3equal-l21-74/+65
2020-06-26Make clippy and cargo fmt happySven-Hendrik Haase1-1/+1
2020-03-11Format everythingSven-Hendrik Haase1-6/+6
2019-12-20Fixed clippy warningsDamian1-1/+1
2019-08-16Fix Clippy warningboastful-squirrel1-0/+1
2019-08-16Do not 'back to listing' link when random route is setboastful-squirrel1-1/+7