# Upload\_large\_folder for uploading to a PR

**URL:** <https://discuss.huggingface.co/t/upload-large-folder-for-uploading-to-a-pr/168505>\
**Category:** 🤗Datasets\
**Created:** [September 17, 2025, 8:32am UTC](https://discuss.huggingface.co/t/upload-large-folder-for-uploading-to-a-pr/168505 "2025-09-17T08:32:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drnhhl](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@drnhhl](https://discuss.huggingface.co/u/drnhhl)\
**Post date:** [September 17, 2025, 8:32am UTC](https://discuss.huggingface.co/t/upload-large-folder-for-uploading-to-a-pr/168505/1 "2025-09-17T08:32:19Z")

</div>

Hi everyone,

Does somebody have experience uploading to a datasets PR with upload\_large\_folder? Is that even possible? I could not find anything about it in he documentation and when trying it, I get a 404 error. I also tried to use the PR name, same result.

`api.upload_large_folder(repo_id=<id>, folder_path=upload_folder, repo_type="dataset", revision="pr/2:refs/pr/2" )`

`Failed to get upload mode: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/user/dataset/preupload/pr/2:refs/pr/2`

If it is not possible, what is the preferred way to upload large datasets to a PR?

Thanks.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 17, 2025, 9:13am UTC](https://discuss.huggingface.co/t/upload-large-folder-for-uploading-to-a-pr/168505/2 "2025-09-17T09:13:38Z")

</div>

If you [create the PR first](https://huggingface.co/docs/huggingface_hub/en/guides/upload), wouldn’t that prevent a 404 error?

> you cannot create a PR directly. Please create a PR first (from the UI or using [create\_pull\_request()](https://huggingface.co/docs/huggingface_hub/v0.35.0/en/package_reference/hf_api#huggingface_hub.HfApi.create_pull_request)) and then commit to it by passing `revision`.

---

<div class="post-metadata">

**Author:** ![drnhhl](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@drnhhl](https://discuss.huggingface.co/u/drnhhl)\
**Post date:** [September 17, 2025, 9:27am UTC](https://discuss.huggingface.co/t/upload-large-folder-for-uploading-to-a-pr/168505/3 "2025-09-17T09:27:57Z")

</div>

This is exactly what I did. I am sorry I did not make this clear before. I have created the PR in the UI before trying to upload to it, however, the PR is still in “draft” mode.
