Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Batch upload on behalf of a user  (Read 3253 times)

0 Members and 1 Guest are viewing this topic.

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Batch upload on behalf of a user
« on: November 02, 2005, 10:40:38 pm »

I sometimes get sent a zip file with over a hundred images by a user who would simply find it too time consuming to upload using the normal method.

Now, there's no problem batch uploading them for the user, but I'd like them to appear as his images not mine. Is there a way of doing this?

(If no features allow this maybe an SQL query I can change some bits in to suit my situation and paste into phpmyadmin would be fine.)
« Last Edit: November 07, 2005, 01:05:50 pm by GauGau »
Logged

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Batch upload on behalf of a user
« Reply #1 on: November 06, 2005, 04:06:58 pm »

Anyone?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch upload on behalf of a user
« Reply #2 on: November 07, 2005, 07:46:57 am »

you could run a query, yes: but I can't give you a query ready for copy'n paste, as you will have to determine the "WHERE" part of the query yourself, depending on the criteria that make that particular upload unique.
The query would be something like
Code: [Select]
UPDATE `cpg13x_pictures` SET ` 
owner_id` = '23' ,
`owner_name` = 'the name of the particular user' WHERE `aid` =234;
where 23 is the user id of your user and aid being the album id of the album you uploaded to. You really have to know what you're doing to accomplish this. Make sure to backup your database before trying this.
Logged

Alex53

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Batch upload on behalf of a user
« Reply #3 on: November 07, 2005, 09:16:55 am »

Thanks.

I know SQL, I just wasnt sure whether the db structure was more complicated and by changing something I'd mess up info on other tables, but after having a good look I realised I just needed to change the 2 owner fields in the pictures table. To facilitate (since there were other images in the album already) I prefixed the files I was going to upload and then matched the prefix...

UPDATE `cpg13x_pictures` SET `owner_id` = '7' ,`owner_name` = 'user name' WHERE `filename` LIKE 'prefix_%';

Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 15 queries.