Jump to content

Big File Upload Class Help


interex

Recommended Posts

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

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));
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.