# How to access tmp files of a space?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%3E%5C
**Category:** Spaces\
**Created:** [October 20, 2023, 8:53am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257 "2023-10-20T08:53:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon85546878](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@anon85546878](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanon85546878)%5C
**Post date:** [October 20, 2023, 8:53am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F1 "2023-10-20T08:53:10Z")

</div>

Greetings,

I have a space running on huggingface, it saves an image but I don’t know how to access the save image like the url of it. I tried: [https://huggingface.co/spaces/tommy24/classifier/file=/tmp/{filename}](https://huggingface.co/spaces/tommy24/classifier/file=/tmp/%7Bfilename%7D)  
but it doesn’t work. Please help me out.

Thank you

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [October 23, 2023, 3:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F2 "2023-10-23T03:46:33Z")

</div>

hi @anon85546878 ,

You probably want to access the `file` param via the subdomain app. Please try

`https://tommy24-classifier.hf.space/file=/tmp/{filename}`

---

<div class="post-metadata">

**Author:** ![anon85546878](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@anon85546878](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanon85546878)%5C
**Post date:** [December 2, 2023, 8:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F3 "2023-12-02T20:40:42Z")

</div>

Facing this error: {“detail”:“File not allowed: /tmp/image.png.”}

Even though the file has been saved, This happens to all the files.

Please help me out.

---

<div class="post-metadata">

**Author:** ![tommy24](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/tommy24/32/22650_2.png) [@tommy24](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftommy24)%5C
**Post date:** [January 3, 2024, 5:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F4 "2024-01-03T17:04:49Z")

</div>

Facing the same error: {“detail”:“File not allowed: /tmp/upload/saved\_image.jpg.”}  
@radames

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [January 3, 2024, 6:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F5 "2024-01-03T18:48:59Z")

</div>

hi @tommy24 and @anon85546878 accessing files via the `file/` route is very Gradio specific and it also depends on your app implementation. A few notes to consider, have a look at [allowed paths](https://www.gradio.app/docs/interface#:~:text=app.%20Default%20True.-,allowed_paths,-list%5Bstr%5D%20%7C%20None) on Gradio docs, make sure the temp file you’re creating is not removed before accessing it via the `file/` route

---

<div class="post-metadata">

**Author:** ![tommy24](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/tommy24/32/22650_2.png) [@tommy24](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftommy24)%5C
**Post date:** [January 12, 2024, 11:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F6 "2024-01-12T11:12:29Z")

</div>

Still not working. Shall I share the code snippet with you? Is it possible for you to look into it and help me solve the issue that I’m facing right now.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [January 12, 2024, 6:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F7 "2024-01-12T18:41:40Z")

</div>

Please, if you can make your Space public and create a minimal, reproducible example, thanks

---

<div class="post-metadata">

**Author:** ![Yosun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yosun/32/46148_2.png) [@Yosun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYosun)%5C
**Post date:** [April 13, 2025, 9:04am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F9 "2025-04-13T09:04:49Z")

</div>

hey just duplicated holopart and same issue with being unable to access /tmp files generated… have burnt $$… (500 error)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 13, 2025, 10:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F10 "2025-04-13T10:57:46Z")

</div>

Hmm… Like this?

> **[HoloPart - a Hugging Face Space by John6666](https://huggingface.co/spaces/John6666/HoloPart-test)**
>
> Discover amazing ML apps made by the community

---

<div class="post-metadata">

**Author:** ![Yosun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yosun/32/46148_2.png) [@Yosun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FYosun)%5C
**Post date:** [April 23, 2025, 7:50am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F11 "2025-04-23T07:50:40Z")

</div>

are you able to access /tmp by urL?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 23, 2025, 8:38am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-access-tmp-files-of-a-space%2F59257%2F12 "2025-04-23T08:38:18Z")

</div>

I forgot to mention that the path specification is quite unique, and no one would understand it without reading the manual. I have created a sample for more details.

> **[file access test - a Hugging Face Space by John6666](https://huggingface.co/spaces/John6666/file-test)**
>
> Discover amazing ML apps made by the community

> **[File Access](https://www.gradio.app/guides/file-access)**
>
> A Step-by-Step Gradio Tutorial
