L
L
Legal Adviser2020-07-07 19:28:22
WordPress
Legal Adviser, 2020-07-07 19:28:22

How to make a different file upload in WP?

Hello.
When you upload files to WP, they are generated in a folder https://сайт.ru/wp-content/uploads/2019/12/файл.*(jpg/pdf, etc.)
Is it possible to make the download look like this:
- if pdf / doc / xls, etc. - in a folder https://сайт.ru/uploads/docs/;
- if jpg etc. - in a folder https://сайт.ru/uploads/media/.
If possible, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Kulikov, 2020-07-07
@anatoly_kulikov

Yes, you can, but according to the wp architecture, it offers to load files exactly by year / month. And in order for you to have such an upload option, you need to write your own implementation using the php move_uploaded_file () function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question