diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-30 14:14:32 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-30 14:14:32 +0200 |
commit | 22a04d8e938d6f2660e6c88cf954d638fc4321eb (patch) | |
tree | 30d24a2dc52cc747a8cbfe4fa14c020e4aefcfe9 /apps/contacts/ajax/uploadphoto.php | |
parent | dbcd26be684461daac7c406cc3f52a2a810d1126 (diff) | |
download | nextcloud-server-22a04d8e938d6f2660e6c88cf954d638fc4321eb.tar.gz nextcloud-server-22a04d8e938d6f2660e6c88cf954d638fc4321eb.zip |
don´t hardcode /tmp
Diffstat (limited to 'apps/contacts/ajax/uploadphoto.php')
-rw-r--r-- | apps/contacts/ajax/uploadphoto.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/contacts/ajax/uploadphoto.php b/apps/contacts/ajax/uploadphoto.php index 99015e2d502..dca8ede6d60 100644 --- a/apps/contacts/ajax/uploadphoto.php +++ b/apps/contacts/ajax/uploadphoto.php @@ -46,7 +46,7 @@ if ($fn) { exit(); } $id = $_GET['id']; - $tmpfname = tempnam('/tmp', 'occOrig'); + $tmpfname = tempnam(get_temp_dir(), 'occOrig'); file_put_contents($tmpfname, file_get_contents('php://input')); debug($tmpfname.' uploaded'); $image = new OC_Image(); @@ -93,7 +93,7 @@ if($error !== UPLOAD_ERR_OK) { } $file=$_FILES['imagefile']; -$tmpfname = tempnam("/tmp", "occOrig"); +$tmpfname = tempnam(get_temp_dir(), "occOrig"); if(file_exists($file['tmp_name'])) { $image = new OC_Image(); if($image->loadFromFile($file['tmp_name'])) { |