diff options
author | Russell McLoughlin <mcloughlin3@llnl.gov> | 2011-06-01 13:16:39 -0700 |
---|---|---|
committer | Russell McLoughlin <mcloughlin3@llnl.gov> | 2011-06-01 13:16:39 -0700 |
commit | 5ce0b61f361809949f88fcd6566eebc3abb2c8df (patch) | |
tree | ea65260c7a06465bf30a60215da4be33e8cdbd93 /mod/file/actions | |
parent | 2850bfb915fa5dc28d290910cba1c97b0c7e3b50 (diff) | |
download | elgg-5ce0b61f361809949f88fcd6566eebc3abb2c8df.tar.gz elgg-5ce0b61f361809949f88fcd6566eebc3abb2c8df.tar.bz2 |
Modified upload script to guarentee that the directory under elgg data is created or exists. Removed strange chunking code with builtin php function
Diffstat (limited to 'mod/file/actions')
-rw-r--r-- | mod/file/actions/file/upload.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index fe93661f2..9581698be 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -106,6 +106,9 @@ 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 guarentee the directory exists + $file->open("write"); + $file->close(); move_uploaded_file($_FILES['upload']['tmp_name'], $file->getFilenameOnFilestore()); $guid = $file->save(); |