# HfApi uploading fail

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhfapi-uploading-fail%2F81620%3E%5C
**Category:** Beginners\
**Created:** [April 14, 2024, 12:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhfapi-uploading-fail%2F81620 "2024-04-14T00:49:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![t2chiang](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@t2chiang](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ft2chiang)%5C
**Post date:** [April 14, 2024, 12:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhfapi-uploading-fail%2F81620%2F1 "2024-04-14T00:49:18Z")

</div>

Hello, I am a newcomer to hugging face API. I am now trying to upload a folder to my repo. Here are my code and error. Can somebody figure out where is the problem? I already login the huggingface in advance. Thank you guys.

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/5/1505fdf5c5c5528aca5493519475fe606a7401b8.png)

```auto
api = HfApi(token=token)

api.upload_folder(
    folder_path='Dataset/HOI4D_resample',
    repo_id='t2chiang/test',
    repo_type='dataset',
)

```
