Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question