# Downloading attachments inside in app from a web view

**URL:** https://meta.discourse.org/t/downloading-attachments-inside-in-app-from-a-web-view/36871
**Category:** Support
**Created:** [December 18, 2015, 2:24am UTC](https://meta.discourse.org/t/downloading-attachments-inside-in-app-from-a-web-view/36871 "2015-12-18T02:24:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BerryBlue](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@BerryBlue](https://meta.discourse.org/u/BerryBlue)
#### Post date: [December 18, 2015, 2:24am UTC](https://meta.discourse.org/t/downloading-attachments-inside-in-app-from-a-web-view/36871/1 "2015-12-18T02:24:17Z")

</div>

When you upload an attachment to a post your get a URL with an alphanumeric filename.

Is there some way to decode the original file name or is this just random? Is there any way to get the uploaded file name?

My app has a web view that shows my discourse and lets the user open the file in the app but tapping the link. However I don’t see a way to get the original file name for that file.

The other problem I have is when you return to the forums in the app after doing this the activity spinner won’t go away.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 18, 2015, 4:27am UTC](https://meta.discourse.org/t/downloading-attachments-inside-in-app-from-a-web-view/36871/2 "2015-12-18T04:27:55Z")

</div>

The random filename is from the image’s sha1 hash.

This was discussed previously.

> [@Use MetaData to indicate image download filename](https://meta.discourse.org/t/use-metadata-to-indicate-image-download-filename/21141):
>
> So we’ve had a couple of internal complaints about the fact that the image download name is the sha1 representation and not the actual name of the image (which is available, because you see it in the lightbox). It seems the “actual” name is stored in the metadata of the image. Is the team open to a PR that retrieves that name and uses it for the download?

@cpradio mentioned submitting a PR that may help; unsure the conclusion to that.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 18, 2015, 6:08am UTC](https://meta.discourse.org/t/downloading-attachments-inside-in-app-from-a-web-view/36871/3 "2015-12-18T06:08:26Z")

</div>


