aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/newfile.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax/newfile.php')
-rw-r--r--apps/files/ajax/newfile.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index a68716f5db3..56b741544f1 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -60,7 +60,16 @@ if($source) {
exit();
}
- $ctx = stream_context_create(null, array('notification' =>'progress'));
+ $contextArray = array(
+ 'http' => array(
+ 'timeout' => 10,
+ 'follow_location' => false, // Do not follow the location since we can't limit the protocol
+ ),
+ 'ssl' => array(
+ 'disable_compression' => true
+ )
+ );
+ $ctx = stream_context_create($contextArray, array('notification' =>'progress'));
$sourceStream=fopen($source, 'rb', false, $ctx);
$target=$dir.'/'.$filename;
$result=\OC\Files\Filesystem::file_put_contents($target, $sourceStream);