Skip to content

Commit

Permalink
Return the filename on success, just in case it was changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfaproject authored and jgoguen committed Dec 4, 2011
1 parent 6ebf4b1 commit 0ebdab8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/php.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ function handleUpload($uploadDirectory, $replaceOldFile = FALSE){
}

if ($this->file->save($uploadDirectory . $filename . '.' . $ext)){
return array('success'=>true);
return array(
'success' => TRUE,
'filename' => $filename .'.'. $ext
);
} else {
return array('error'=> 'Could not save uploaded file.' .
'The upload was cancelled, or server error encountered');
Expand Down

0 comments on commit 0ebdab8

Please sign in to comment.