S
S
Stanislav2018-06-18 05:14:12
Nginx
Stanislav, 2018-06-18 05:14:12

Can there be problems when uploading static files via Nginx?

There is one site with photos, users often download photos, photos were previously opened via a link
адрес_сайта/photo-time.jpg
. As for me, it’s not very convenient for users, because new tabs are constantly opening, and they download sooooo much, they have to go to the tab, save the picture and close it, in general, unnecessary actions ...
Now I made a return of statics to the star for downloading if a GET request
адрес_сайта/photo-time.jpg?download=1
is sent. When you click on the link, the picture immediately goes to download, which is very convenient, but in the Yandex web wizard I came across a user who clicked and clicked on the photo in the hope of downloading it and it looks like it didn't work.
The following rule is written in Nginx
In the main location I catch the GET request download=1 and redirect to @download

location @download {
        add_header Content-disposition "attachment; filename=$image_name";
    }

Are there any problems for users? Maybe something else needs to be given some headings?
I just can’t understand whether a person has a habit of opening photos on this site and viewing them, and he simply doesn’t see that he is already uploading, or does he still have some problems with the return?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question