Watermark images during upload

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
praf
User
Posts: 9

Watermark images during upload

Post by praf »

Hi
I would like to put watermark on images that get uploaded. The image should only get watermarked once, so I guess just after successful upload of the image? I have the php code to add the watermark to the image. What is the best place to execute the function.
Thanks.


arbei
User
Posts: 9347

Post by arbei »

You can use the Row_Inserted or Row_Updated Server Event and update the corresponding files.

In the above Server Event, the records are updated and the image is uploaded to the upload folder with the corresponding file name in $rsnew.

Read help file topic: "Server Events and Client Scripts" -> "Row_Inserted" and "Row_Updated" for more information.


praf
User
Posts: 9

Post by praf »

Thanks. Managed to do this with both the server events.

FYI
My app is set for multiple file upload and max size option in phpmaker. There is an issue if there are lot of files being uploaded - the resize process (and watermarking) on save fails to complete. I had to increase the PHP execution timeout on the page to overcome this.


Post Reply