# Embedding files and versions in notes

**URL:** <https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404>\
**Category:** Flow Production Tracking\
**Tags:** python-api\
**Created:** [August 1, 2019, 1:14pm UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404 "2019-08-01T13:14:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hristo\_Velev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/hristo_velev/32/292_2.png) [@Hristo\_Velev](https://community.shotgridsoftware.com/u/Hristo_Velev)\
**Post date:** [August 1, 2019, 1:14pm UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/1 "2019-08-01T13:14:22Z")

</div>

Hi guys,

We have design pages for our shots, and I’m checking moving these from wiki to shotgun, so we can have all related stuff there, and it’s convenent to have that as a note, so there can be a discussion underneath, link to shots, etc.

We upload reference images and drawings to shotgun too, and we have them tagged, and we can see them in a separate page. But I really want to embed them in the note that describes the design. The problem is that when I try embedding with markdown, the ![title]() syntax, and pick the URL that i get when I open the file, it’s an AWS URL that has an expiry, so the image disappears soon. Is there something I can do to avoid that?

Thanks

---

<div class="post-metadata">

**Author:** ![johnny.duguid](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/johnny.duguid/32/4_2.png) [@johnny.duguid](https://community.shotgridsoftware.com/u/johnny.duguid)\
**Post date:** [August 5, 2019, 5:31pm UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/2 "2019-08-05T17:31:54Z")

</div>

Hey @Hristo_Velev! I believe this is a security precaution of content hosted on AWS. Not aware of a workaround. Let me poke around.

---

<div class="post-metadata">

**Author:** ![bouchep](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/bouchep/32/93_2.png) [@bouchep](https://community.shotgridsoftware.com/u/bouchep)\
**Post date:** [August 5, 2019, 10:05pm UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/3 "2019-08-05T22:05:03Z")

</div>

Hi @Hristo_Velev,

The AWS link expires for security purposes like Johnny mentions. If you are embedding a link in a Shotgun note such that the viewer needs to be logged in to view the note you can use the following syntax:

```auto
![test](https://<your_site>.shotgunstudio.com/file_serve/attachment/<attachment_id>)

```

This will then resolve the link to an AWS link on the fly and display it in your note. This means you need to know the id of the `Attachment` you are interested in (the `File` entity in the UI is known as an `Attachment` internally). If you only know the version that was created that holds your image, you can use the following Python API call to resolve the `Attachment`/`File`:

```auto
>>> version = sg.find_one('Version', [['id', 'is', <my_version_id>]], ['sg_uploaded_movie'])
>>> version.get('sg_uploaded_movie', {}).get('id')

```

This only works for static images, not movies.

---

<div class="post-metadata">

**Author:** ![Hristo\_Velev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/hristo_velev/32/292_2.png) [@Hristo\_Velev](https://community.shotgridsoftware.com/u/Hristo_Velev)\
**Post date:** [August 6, 2019, 7:25am UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/4 "2019-08-06T07:25:08Z")

</div>

Thanks, that makes sense and it works! There’s one more thing I’d love to do and is a bit related - I have set up a Formats page so people can keep an eye on the different formats/resolutions, and I’ve made it display project fields and shot fields, and I want to embed a page from our wiki that explains which format means which.

The problem comes from embedding the wiki page - it’s hosted locally confined to our production network, and Shotgun goes through a proxy for the outside world. Is there a way to tell it to bypass the proxy for that page, or some other solution? Thanks!

---

<div class="post-metadata">

**Author:** ![Ben\_xzj](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ben_xzj/32/289_2.png) [@Ben\_xzj](https://community.shotgridsoftware.com/u/Ben_xzj)\
**Post date:** [August 6, 2019, 7:41am UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/5 "2019-08-06T07:41:17Z")

</div>

@Hristo_Velev, leave the bypassing proxy for other team members. A general trick here, just FYI, that the page that you want to embed into SG has to allow itself to be imbedded in an iframe. You may want to check this out if you are using Confluence wiki. [https://confluence.atlassian.com/confkb/confluence-page-does-not-display-in-an-iframe-827335781.html](https://confluence.atlassian.com/confkb/confluence-page-does-not-display-in-an-iframe-827335781.html)

---

<div class="post-metadata">

**Author:** ![Hristo\_Velev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/hristo_velev/32/292_2.png) [@Hristo\_Velev](https://community.shotgridsoftware.com/u/Hristo_Velev)\
**Post date:** [August 6, 2019, 7:47am UTC](https://community.shotgridsoftware.com/t/embedding-files-and-versions-in-notes/404/6 "2019-08-06T07:47:16Z")

</div>

Cool, thanks - we’re using mediawiki, will do a search to see how to enable embedding. This will be very helpful in bringing these two platforms together.
