# Attachment filename not set on download

**URL:** https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871
**Category:** Support
**Tags:** unsupported-install
**Created:** [February 24, 2017, 3:30am UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871 "2017-02-24T03:30:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [February 24, 2017, 3:30am UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/1 "2017-02-24T03:30:06Z")

</div>

Hello  
I authorized my own extension, made a new post and uploaded a test file of my extension and the download does not have the original filename.  
I also attached an txt file and that doesn’t download, but it opens in the same screen.

My current version is `v1.8.0.beta5 +99`. sidekiq is not running.

My test discourse server is hosted on AWS and following these guides:

> [@Install Discourse on Ubuntu or Debian for Development](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727):
>
> warning This guide covers installation instructions in a development environment. For a production guide see: [Install Discourse in production with the official supported instructions](https://meta.discourse.org/t/how-to-install-discourse-in-production/142537) So you want to set up Discourse on Ubuntu or Debian to hack on and develop with? We’ll assume that you work locally and don’t have Ruby/Rails/Postgres/Redis installed on your Ubuntu or Debian system. Let’s begin! Requirements We suggest having at least 4 GB RAM and 2 CPU cores. Current compatibility: O…

> [@Migrate a vBulletin 4 forum to Discourse](https://meta.discourse.org/t/importing-from-vbulletin-4/54881):
>
> In this tutorial we will learn how to migrate vBulletin forum to discourse platform using [vBulletin importer script](https://github.com/discourse/discourse/blob/master/script/import_scripts/vbulletin.rb). I have tested the script with a big database and the result was very good. The script is well written and maintained. Let’s get started slight_smileWhat data can be imported? Groups Users Banned Users =\> Suspended Users Forums Each parent and child forum =\> Category and Sub-category Topics Sticky Thread =\> Pinned Topic Closed Thread =\> Closed Topic Soft Deleted Thr…

I have read various posts about attachments are saved on disk/s3 with the filehash as the filename. However, I noticed that the discourse.txt download from the first post here:  
[https://meta.discourse.org/t/new-attachments/8609](https://meta.discourse.org/t/new-attachments/8609)

has this header on download:` Content-Disposition:"attachment; filename="discourse.txt"`

Is that the side effect of using S3 as file storage? Can that header be added for disk base file storage?

Thank you.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 24, 2017, 8:19am UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/2 "2017-02-24T08:19:45Z")

</div>

Why is sidekiq not running? You should fix that first.

---

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [February 24, 2017, 3:02pm UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/3 "2017-02-24T15:02:27Z")

</div>

I stopped running sidekiq because I kept seeing error messages about failing to connect to redis. I deleted the three redis queue and now sidekiq seems to be ok. I see passing jobs in `sidekiq/statistic/realtime`. My instance is an m4.large.

Now inline pictures and attachment download links are using localhost:3000 as the domain, instead of ec2’s public dns name. I’ve tried setting the company domain name, but it did not help.  
I had truncated the posts and topics tables many times, does this contribute to my download problems? Maybe I should start with a new, fresh server?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 24, 2017, 3:21pm UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/4 "2017-02-24T15:21:15Z")

</div>

Wow what have you done to your poor Discourse?

Did you install it using our recommended Docker install? If not, you should start over and follow it.

---

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [February 24, 2017, 10:11pm UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/5 "2017-02-24T22:11:54Z")

</div>

I made a docker setup and everything is working as expected. Files are downloaded with the original file name.  
I also made another development setup (not docker) and I think sideqik was turning my attachment urls to use localhost; I’ll take this up in #Development if I need to go down this path.

Thanks.

---

<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: [February 24, 2017, 10:30pm UTC](https://meta.discourse.org/t/attachment-filename-not-set-on-download/57871/6 "2017-02-24T22:30:11Z")

</div>


