This topic is locked

Rename Image on File Upload

10/17/2008 6:02:59 PM
PHPRunner General questions
U
Urnso author

I found some code on this forum to help me rename my files and upload them to disk then put the renamed file name in the correct field thus into the database. It works fine when using inline edit to select the keep or update radio button.
When you click the delete radio button the image is deleted but the values are still in the database.
How can I have it remove that info from the field when the delete radio button is checked??
Here the code I use on before record updated.
[codebox]global $files_move;

foreach( $files_move as $key=>$val)

{

if($val[0]==$_FILES["file_Image1"]["tmp_name"])

$files_move[$key][1] = "images/Bobst/".$values["JDE"]."-Image1.jpg";

}
$values["Image1"] = $values["JDE"]."-Image1.jpg";

return true;[/codebox]
I am hoping it is something simple. Thx!

U
Urnso author 10/19/2008

I tried to send through demo account to show you what was happening. It says my project is too large (over 10MB). How else can I get you the files so you can help me with this?
Thx!

J
Jane 10/20/2008

Hi,
check file size in your event and update field with empty string if file size equals 0.