Skip to content

Commit

Permalink
Merge pull request #38 from roibeart/roibeart-readme-edit
Browse files Browse the repository at this point in the history
Edited upload.php example in README file
  • Loading branch information
AidasK committed Oct 31, 2017
2 parents 340ed5b + c716bbb commit ca83319
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ require_once './vendor/autoload.php';
$config = new \Flow\Config();
$config->setTempDir('./chunks_temp_folder');
$request = new \Flow\Request();
if (\Flow\Basic::save('./' . $request->getIdentifier(), $config, $request)) {
// file saved successfully and can be accessed at './final_file_destination'
$uploadFolder = './final_file_destination/' // Folder where the file will be stored
$uploadFileName = uniqid()."_".$request->getFileName(); // The name the file will have on the server
$uploadPath = $uploadFolder.$uploadFileName;
if (\Flow\Basic::save($uploadPath, $config, $request)) {
// file saved successfully and can be accessed at $uploadPath
} else {
// This is not a final chunk or request is invalid, continue to upload.
}
Expand Down

0 comments on commit ca83319

Please sign in to comment.