interex Posted March 31, 2014 Share Posted March 31, 2014 Hi, I have the following php class file that handles large file uploads. I'm just learning OOP programming with PHP and I can't figure out after a successful upload is made where I can grab the final file name and write it to mysql database. Below is the code. Attached are the files. Thanks for the help! bigUpload.php Quote Link to comment Share on other sites More sharing options...
iarp Posted March 31, 2014 Share Posted March 31, 2014 (edited) Line 160 returns the json of errorStatus = 0, you can just add to that array and do something like below: if(rename($this->getTempDirectory() . $this->getTempName(), $this->getMainDirectory() . $finalName)) { return json_encode(array('errorStatus' => 0, 'final_filename' => $this->getMainDirectory() . $finalName)); } Edited March 31, 2014 by iarp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.