DVCLI: Pick files via OS file picker #12
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new, flexible file picker system to the CLI, allowing users to select files for upload using either a GUI dialog or a command-line prompt. It refactors the dataset and file upload logic to use this picker, supporting both single and multiple file selection and improving user experience across platforms.
File Picker System Integration
file_picker
with theFilePickerOptions
struct and related logic to support both GUI and TTY-based file selection, including multi-file support. This uses therfd
andinquire
crates for GUI dialogs and command-line prompts, respectively. [1] [2] [3]Refactoring CLI Upload Workflows
DatasetSubCommand
andFileSubCommand
indataset.rs
andfile.rs
to use the new file picker, allowing users to select files interactively or via pre-supplied paths, with support for both single and multiple uploads. [1] [2] [3] [4] [5] [6]Direct Upload Logic Improvements
UploadFile
type, ensuring robust filename extraction and MIME type inference, and restricting direct uploads to local files only.Dependency Additions
rfd
(for GUI file dialogs) andinquire
(for interactive command-line prompts) toCargo.toml
.These changes collectively improve the flexibility and usability of file selection in the CLI, making uploads more user-friendly and robust across different environments.