mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-28 10:30:42 +00:00
- remove new file after successful insertion
This commit is contained in:
parent
740c4954cb
commit
47dc2d7616
|
|
@ -63,7 +63,6 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment = sanitizeString($_POST["comment"]);
|
$comment = sanitizeString($_POST["comment"]);
|
||||||
$userfiletmp = $_FILES["userfile"]["tmp_name"];
|
|
||||||
|
|
||||||
$userfiletmp = $settings->_stagingDir.$_POST['fileId'];;
|
$userfiletmp = $settings->_stagingDir.$_POST['fileId'];;
|
||||||
$userfiletype = $_FILES[ $file_param_name ]["type"];
|
$userfiletype = $_FILES[ $file_param_name ]["type"];
|
||||||
|
|
@ -150,6 +149,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) {
|
||||||
|
|
||||||
|
|
||||||
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers);
|
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers);
|
||||||
|
unlink($userfiletmp);
|
||||||
if (is_bool($contentResult) && !$contentResult) {
|
if (is_bool($contentResult) && !$contentResult) {
|
||||||
echo getMLText("error_occured");
|
echo getMLText("error_occured");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -206,7 +206,6 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_log_line("?documentid=".$documentid);
|
add_log_line("?documentid=".$documentid);
|
||||||
header("Location:../out/out.ViewDocument.php?documentid=".$documentid);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user