You haven't shown how/what your controller is sending back to the client. Why does the response contain the SQL query? In any case, just send the new filename back. Use JSON, for example. Have a look at the json_encode() function.
On Wed, Aug 5, 2009 at 9:27 AM, Dave Maharaj :: WidePixels.com<[email protected]> wrote: > I am uloading a file to the server using an ajax upload script. Now > everything is working fine except I cant figure out how to get the name of > the file uploaded back to the page after uploading. > > Using Valums ajax upload script > > The file that gets uploaded say 03.jpg gets renamed to $user_$unique_id so > it turns into myname_12565895.jpg on the server > > I used > alert(response); in the script after succesful upload and see > > UPDATE `entries` SET `image` = 'joekool_b9b071c1e64.jpg' WHERE > `entries`.`id` = 'b9b071c1e64' > > How can I grab the image` = 'joekool_b9b071c1e64.jpg' and pass it back to > the script rather than the 03.jpg. After upload it says 03.jpg uploaded > succesfully but i need the server converted name so I can display the image > instead of the name. > > Ideas? > > Dave > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
