Batch upload on behalf of a user Batch upload on behalf of a user
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Batch upload on behalf of a user

Started by Alex53, November 02, 2005, 10:40:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alex53

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.)

Alex53


Joachim Müller

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 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.

Alex53

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_%';