]> jfr.im git - uguu.git/blobdiff - static/php/upload.php
Merge pull request #62 from nokonoko/testing
[uguu.git] / static / php / upload.php
index 87190763be82e46bf89f41cc7cff3b7e0c1d2d9e..d1a4d4c1c31604f13a8cbd05972d2f1a6384fc92 100644 (file)
@@ -105,6 +105,7 @@ function uploadFile($file)
 
     // Attempt to move it to the static directory
     if (!move_uploaded_file($file->tempfile, $uploadFile)) {
+        http_response_code(500);
         throw new Exception(
             'Failed to move file to destination',
             500
@@ -113,6 +114,7 @@ function uploadFile($file)
 
     // Need to change permissions for the new file to make it world readable
     if (!chmod($uploadFile, 0644)) {
+        http_response_code(500);
         throw new Exception(
             'Failed to change file permissions',
             500