Prefixing filenames? Prefixing filenames?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Prefixing filenames?

Started by turtleboy, April 05, 2004, 12:47:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

turtleboy

How do you prefix the file names of the images being uploaded with  the current users username? I thought this was supposed to be default, but it won't work under any user.

Joachim Müller

no, this is not default. Coppermine uses a database to keep track of files - no need to rename files, as the database "knows" who uploaded the file.
Such a feature doesn't exist. What coppermine does is creating a new folder within "userpics" for each user (not with the username, but a number corresponding to the user) this user's uploads go to (except if the server runs in safe mode).

GauGau

turtleboy

I think my server is running in safe mode, because all of the photos go into the same directory (userpics). Is there anyway that I can prefix the file names? The only reason being conflicts between different users with the same filename.

I have some code that does this on a different uploader, but Im not sure how to implement it into Coppermine.

Joachim Müller

Coppermine will solve such conflicts: if a filename already exists, coppermine will rename the file. Please post a link and a test user account to check.

GauGau