aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/file/actions/file/upload.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php
index e04203f67..fe93661f2 100644
--- a/mod/file/actions/file/upload.php
+++ b/mod/file/actions/file/upload.php
@@ -106,9 +106,7 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) {
$file->originalfilename = $_FILES['upload']['name'];
$file->simpletype = file_get_simple_type($_FILES['upload']['type']);
- $file->open("write");
- $file->write(get_uploaded_file('upload'));
- $file->close();
+ move_uploaded_file($_FILES['upload']['tmp_name'], $file->getFilenameOnFilestore());
$guid = $file->save();