Welcome Guest, Not a member yet? Register   Sign In
keeping user images in the assets/uploads dir - multiprocess question
#2

(This post was last modified: 07-16-2021, 01:43 PM by craig.)

Quote:Does each user have their own copy of the CI environment on disk?

No.

Quote: I am asking if two users are sharing the same directory space in /asset/uploads

Yes, all users are - unless you code it otherwise.


CI and the file storage system has no concept of different or separate users of your application. As the developer, it is your responsibility to segregate the files in whatever way makes sense to you. All CI is doing is taking an uploaded file and placing it in a folder that you tell it to.

My suggestions would be to do one of the following:

1) Delete the file as soon as it's successfully uploaded to S3.

2) Track files in the database, with a field to mark whether it has successfully uploaded to S3 (For example: 0 by default, 1 on success). Then you can SELECT the files where S3=1, and delete them - either in a cron job function, or periodically from pages that users visit in your site.

3) Create a folder for each user's files.
Reply


Messages In This Thread
RE: keeping user images in the assets/uploads dir - multiprocess question - by craig - 07-16-2021, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB