0

I wonder if there is a clear method or example of how to assign a directory to each user of my web platform.

I have tried to search and I have seen many examples, but none clear or updated that is functional.

so they can understand me a little better.

I wish:

 ttps//mysite/upload_folder/**username_folder**/img.jpg

and NOT a generic route like

ttps://mysite/upload_folder/img.jpg

Thanks in advance.

1 Answers1

0

When a new user is created you could create a directory with the user_id or name. An example would be mkdir('upload_folder/' . $user_id . '/img');

In this directory you can let the user store images using a form with the upload input.

  • ok, and how would you handle existing users? What would be the steps to assign that dynamic route? That is, by the time the user visualizes the CkEditor is because already start session, how would assign the correct parameters so that when the user click on see server, it sees the dynamic route assigned to the? – Neri Colon Mar 03 '18 at 19:47