X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=js_upload%2Fjs_upload.php;h=148fde313a43557d9b2068aa773c029127731590;hb=01cb8aa4964aeb27b5c57bd5872c42ca3a7ab298;hp=3ba5f9c4dc74a850d5082565a4df5d09be979972;hpb=e81e7f7e79710233c0aeac9f8039bf6548cf8013;p=friendica-addons.git diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 3ba5f9c4..148fde31 100755 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -196,7 +196,13 @@ class qqUploadedFileXhr { */ function save() { $input = fopen("php://input", "r"); - $this->pathnm = tempnam(sys_get_temp_dir(),'frn'); + + $upload_dir = get_config('system','tempdir'); + if(! $upload_dir) + $upload_dir = sys_get_temp_dir(); + + $this->pathnm = tempnam($upload_dir,'frn'); + $temp = fopen($this->pathnm,"w"); $realSize = stream_copy_to_stream($input, $temp);