Prefixing filenames? Prefixing filenames?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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