]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apimediaupload.php
60 chars was too little, 100 chars seems better. For me.
[quix0rs-gnu-social.git] / actions / apimediaupload.php
index 0b08dbedf1bc1dec517b0e8e26307ca1e9e4d280..b4f8709fe23071d82b283c36b1f90f9ee602c395 100644 (file)
@@ -30,9 +30,6 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/apiauth.php';
-require_once INSTALLDIR . '/lib/mediafile.php';
-
 /**
  * Upload an image via the API.  Returns a shortened URL for the image
  * to the user.
@@ -88,7 +85,7 @@ class ApiMediaUploadAction extends ApiAuthAction
         $upload = null;
 
         try {
-            $upload = MediaFile::fromUpload('media', $this->auth_user);
+            $upload = MediaFile::fromUpload('media', $this->auth_user->getProfile());
         } catch (Exception $e) {
             $this->clientError($e->getMessage(), $e->getCode());
             return;