A
A
Artem00712017-04-05 20:47:20
PHP
Artem0071, 2017-04-05 20:47:20

How to change the name when uploading a document?

I have files on the site with names in the form of billebirds, those
aasdasdasdsadasdasd.txt
How to make it so that when a person presses the download button, this name on the server would remain as it is, but a file like example.txt would already be downloaded from him ?
I found a way out only to duplicate the file on the server with a name change, but this is not a good idea

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nurlan, 2017-04-05
@Artem0071

Content-Disposition: attachment; filename="filename.ext"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question