# Create a URL for a media file: the truth about getFileURL

**URL:** <https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548>\
**Category:** Show and tell\
**Tags:** tips, code\
**Created:** [September 16, 2020, 9:53am UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548 "2020-09-16T09:53:00Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![polkaset](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/polkaset/32/16578_2.png) [@polkaset](https://forum.wixstudio.com/u/polkaset)\
**Post date:** [January 28, 2022, 4:51pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/21 "2022-01-28T16:51:53Z")

</div>

I’m not sure I understand…you actually have files/folders of plant images? Or you are just using my example code above that deals with plants? My website is for a plant retailer/grower. I’m not sure I understand what you’re asking.

---

<div class="post-metadata">

**Author:** ![ilisie-ion](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ilisie-ion/32/80634_2.png) [@ilisie-ion](https://forum.wixstudio.com/u/ilisie-ion)\
**Post date:** [February 14, 2022, 8:58pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/22 "2022-02-14T20:58:54Z")

</div>

“The nice thing about **getFileURL** is that you can use it for content where you don’t want to make the URL permanently available”

Is there a way to get a permanent URL to a file/video/image and so on?

---

<div class="post-metadata">

**Author:** ![ronald28659](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ronald28659/32/22508_2.png) [@ronald28659](https://forum.wixstudio.com/u/ronald28659)\
**Post date:** [February 24, 2022, 2:49pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/23 "2022-02-24T14:49:36Z")

</div>

yes, static URL is also explained in the opening post.

---

<div class="post-metadata">

**Author:** ![ilisie-ion](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ilisie-ion/32/80634_2.png) [@ilisie-ion](https://forum.wixstudio.com/u/ilisie-ion)\
**Post date:** [February 25, 2022, 7:12pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/24 "2022-02-25T19:12:43Z")

</div>

@ronald28659 Hi Ronald, thanks for answering. The static URL you are referring is temporary only, is not permanent therefore cannot be used, not for my purpose anyway. I contacted Wix support and I was told is not available now but there is some plan to resolve this in the future. Am I missing something?  
Thanks

---

<div class="post-metadata">

**Author:** ![ronald28659](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ronald28659/32/22508_2.png) [@ronald28659](https://forum.wixstudio.com/u/ronald28659)\
**Post date:** [March 4, 2022, 2:59pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/25 "2022-03-04T14:59:53Z")

</div>

@ilisie-ion My understanding is that getFileUrl() gives you an expiring URL and that the alternative static URL does NOT expire.  
The static URL is visible in the Media Library or in the response to [**upload()**](https://www.wix.com/corvid/reference/wix-media-backend/mediamanager-obj/upload) or [**importFile()**](https://www.wix.com/corvid/reference/wix-media-backend/mediamanager-obj/importfile) or [**getFileInfo()**](https://www.wix.com/corvid/reference/wix-media-backend/mediamanager-obj/getfileinfo)

If you want to use the link to your file for more than 10 hours:

1. you need to regenerate the URL and token,  
or
2. you can use a static link as shown above.

---

<div class="post-metadata">

**Author:** ![gong911](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gong911/32/33379_2.png) [@gong911](https://forum.wixstudio.com/u/gong911)\
**Post date:** [May 13, 2022, 10:23pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/26 "2022-05-13T22:23:41Z")

</div>

Hi,

I was wondering if it would be possible to control downloaded PDF filename when using a embedded PDF viewer (iframe + dynamically added link with format: [https://docs.wixstatic](https://docs.wixstatic) .com/ugd/${url})?

I went ahead with an example from here: [https://www.youtube](https://www.youtube) .com/watch?v=VCE2FnnAwwQ  
And I can see that I could use a “dn={fileName}” query parameter but that would make the website to automatically download the file instead of filling the inner iframe with PDF viewer view and file content.

Is there any option / parameter to control downloaded filename or a workaround?

---

<div class="post-metadata">

**Author:** ![karibuu-co](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/karibuu-co/32/27447_2.png) [@karibuu-co](https://forum.wixstudio.com/u/karibuu-co)\
**Post date:** [November 26, 2023, 3:53pm UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/27 "2023-11-26T15:53:57Z")

</div>

I’m very new at this topic. How do I know the parentFolderId?

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [November 30, 2023, 12:21am UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/28 "2023-11-30T00:21:41Z")

</div>

Hey @karibuu-co!

This topic is a little old, I’m gonna close comments and recommend starting a new one with a few details about what you’re hoping to achieve and what you’ve tried already 🙂

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [November 30, 2023, 12:21am UTC](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548/29 "2023-11-30T00:21:44Z")

</div>

Closed on November 30, 2023, 12:21am UTC



[Previous page](https://forum.wixstudio.com/t/create-a-url-for-a-media-file-the-truth-about-getfileurl/36548.md?page=1)
