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 Link to comment https://forums.phpfreaks.com/topic/287415-big-file-upload-class-help/ Share on other sites More sharing options...
iarp Posted March 31, 2014 Share Posted March 31, 2014 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)); } Link to comment https://forums.phpfreaks.com/topic/287415-big-file-upload-class-help/#findComment-1474520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.