diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-18 22:49:29 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-19 15:26:38 +0100 |
commit | d577aad4ac876c1ed29f7b81199f607da581239b (patch) | |
tree | 55bca408402528a7fff2e4d5a0acb5aa7e4ee534 /apps/files_external/lib/amazons3.php | |
parent | 5fd36d017ecdbce61dcf1c67ae04c8c0be81a4bf (diff) | |
download | nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.tar.gz nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.zip |
Use OCP classes as much as possible in files_external
Diffstat (limited to 'apps/files_external/lib/amazons3.php')
-rw-r--r-- | apps/files_external/lib/amazons3.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index b956a607eba..fd98d26f834 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -372,7 +372,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { switch ($mode) { case 'r': case 'rb': - $tmpFile = \OC_Helper::tmpFile(); + $tmpFile = \OCP\Files::tmpFile(); self::$tmpFiles[$tmpFile] = $path; try { @@ -404,7 +404,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { } else { $ext = ''; } - $tmpFile = \OC_Helper::tmpFile($ext); + $tmpFile = \OCP\Files::tmpFile($ext); \OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack')); if ($this->file_exists($path)) { $source = $this->fopen($path, 'r'); @@ -464,7 +464,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { ]); $this->testTimeout(); } else { - $mimeType = \OC_Helper::getMimetypeDetector()->detectPath($path); + $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($path); $this->getConnection()->putObject([ 'Bucket' => $this->bucket, 'Key' => $this->cleanKey($path), @@ -629,7 +629,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { 'Bucket' => $this->bucket, 'Key' => $this->cleanKey(self::$tmpFiles[$tmpFile]), 'SourceFile' => $tmpFile, - 'ContentType' => \OC_Helper::getMimeType($tmpFile), + 'ContentType' => \OC::$server->getMimeTypeDetector()->detect($tmpFile), 'ContentLength' => filesize($tmpFile) )); $this->testTimeout(); |