Answer the question
In order to leave comments, you need to log in
How to get a list of files in a directory and rename one of them?
There are files in the directory, you need to make it possible for the user to re-upload them, but leave the old version.
To do this, I want to add something (file-name__old.jpg) to the old file, save a new file (file-name.jpg) and save the whole thing in the database.
But so far it's not even possible to get a list of all files from the directory
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question