]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apimediaupload.php
Remove CSRF protection from username/password login and from OpenID login.
[quix0rs-gnu-social.git] / actions / apimediaupload.php
index ec316edc8d78b1c50d5573db9a10bad8ac9707d0..7aa88c186bcc58c3592393e6d90bda8f7596feaf 100644 (file)
@@ -88,15 +88,15 @@ class ApiMediaUploadAction extends ApiAuthAction
 
         try {
             $upload = MediaFile::fromUpload('media', $this->auth_user);
-        } catch (ClientException $ce) {
-            $this->clientError($ce->getMessage());
+        } catch (Exception $e) {
+            $this->clientError($e->getMessage(), $e->getCode());
             return;
         }
 
         if (isset($upload)) {
             $this->showResponse($upload);
         } else {
-            $this->clientError('Upload failed.');
+            $this->clientError(_('Upload failed.'));
             return;
         }
     }