diff options
author | cash <cash.costello@gmail.com> | 2011-06-24 13:42:07 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-06-24 13:42:07 -0400 |
commit | 3c2f72753335a5ca793cf8250c4233d04689e5d2 (patch) | |
tree | 43fb542574f791bc47546e65e24f858c3eec0698 /mod/file/actions | |
parent | 42e02f03c306717002aac0d36f0e2b48bf369fed (diff) | |
parent | d701c3bdf59e2d326c27dd0567323e09a65c00f2 (diff) | |
download | elgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.gz elgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'mod/file/actions')
-rw-r--r-- | mod/file/actions/file/upload.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 5d5c28bee..c5fe763cb 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -106,9 +106,10 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) { $file->originalfilename = $_FILES['upload']['name']; $file->simpletype = file_get_simple_type($_FILES['upload']['type']); + // Open the file to guarantee the directory exists $file->open("write"); - $file->write(get_uploaded_file('upload')); $file->close(); + move_uploaded_file($_FILES['upload']['tmp_name'], $file->getFilenameOnFilestore()); $guid = $file->save(); |