user984621
user984621

Reputation: 48483

How to denied display images, PDF files - and allow only download them?

I have an images uploaded on my FTP and because they are really big (sometimes bigger than 10MB), their display takes lot of times, sometimes are not displayed at all.

That's why I would like to denied displaying these files and allow to user only download them - how to do that?

Upvotes: 0

Views: 255

Answers (1)

user984621
user984621

Reputation: 48483

Here is what I have been looking for.

Into the .htaccess

<Files *.pdf>
  Header set Content-Disposition attachment
</Files>

Upvotes: 1

Related Questions