M
M
MalGym2021-12-20 13:33:22
Node.js
MalGym, 2021-12-20 13:33:22

How to create folders on the server?

Hello. I'm sorry if this is a stupid question, I started learning NodeJs and there is such a task:
A person visits the site, creates layers \ folders, can upload pictures to them and edit them ... A person can create as many layers \ folders as he likes and can upload as many to each folder any pictures.

61c058ef16c49762156503.jpeg

I thought that with each layer created, I create a folder with the same name on the server, but the question is:
1) If 10,50,100 people work at the same time ... people, it will turn out to be porridge
2) Folder names will intersect and will it fall out into a bug or some kind of bug.
3) After completion of work, I would like to delete all folders of this user, do not store all this on the server, something not related to this user may be deleted

What is the best way to organize work , structure ? Can I create these working folders on the computer of a specific user, and not on the server, or somehow create a folder with a unique ID for each user, and folders / layers already created by him in it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drno, 2021-12-20
@Drno

create a folder by name \ user id
inside create what you want
after the user logs out - delete his folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question