Add ability to upload folder with upload_file
See original GitHub issueIs your feature request related to a problem? Please describe.
In the spirit of moving away from forcing users to deal with git, it would be nice to allow folks to upload entire folders using upload_file
, instead of having them glob/walk through all the files and call upload_file
each time.
Describe the solution you’d like
from huggingface_hub import upload_file
# Uploads contents of `images/` to `nateraw/some-repo`
upload_file('nateraw/some-repo', './images/')
Describe alternatives you’ve considered
Bonus points if we have “compression” options as well (zip, tar, gz, etc). If we do that though, we should be mindful of potentially including decompression options in the proposed download_file
function #460
Additional context
Wanted to upload a few small folders and found myself having to write more code than I wanted to in order to loop over all my local files and call upload_file
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Upload files and folders to a library - Microsoft Support
Open the OneDrive or SharePoint site library. · Select Upload at the top of the Documents library. · In the Add a document...
Read more >Power Apps Upload Multiple Files AND Drag and Drop Files
If you want to upload files, then you need this. You will learn how to multi-select files + drag and drop files into...
Read more >Power Automate Desktop : 113 || Upload File(s) to FTP and ...
INDIA. Power Automate Desktop : 113 || Upload File (s) to FTP and Upload Folder (s) to FTP || FTP Automation. 6.9K views...
Read more >PowerApps upload file to SharePoint document library
In this video, you will learn how to upload a file directly to a SharePoint Document Library. No crazy complex code, finally a...
Read more >Uploading Files — Flask Documentation (2.2.x)
We want to be able to serve the uploaded files so they can be downloaded by users. We'll define a download_file view to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IMO instead of supporting uploading folders with
upload_file
, I would rather have a separate methodupload_folder
orupload_files
which allows receiving a directory (or file pattern even!) to upload multiple files.WDYT @LysandreJik?
Closed with #888