aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-30 14:56:08 -0800
committerzotlabs <mike@macgirvin.com>2017-11-30 14:56:08 -0800
commitef4a0e5af5a249879e446636bd0ade54e2df0b9b (patch)
treede407ad63cb6275643e2bec8f4fdea0b26d9b51a /include/import.php
parent3acc5b05086548a3f1bc2beb744d3fb03703b6a5 (diff)
parentfc5b6887168a25992fb089ed7da7ac917e7aaf6b (diff)
downloadvolse-hubzilla-ef4a0e5af5a249879e446636bd0ade54e2df0b9b.tar.gz
volse-hubzilla-ef4a0e5af5a249879e446636bd0ade54e2df0b9b.tar.bz2
volse-hubzilla-ef4a0e5af5a249879e446636bd0ade54e2df0b9b.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/import.php b/include/import.php
index 702fa7e54..8cab16342 100644
--- a/include/import.php
+++ b/include/import.php
@@ -1199,7 +1199,14 @@ function sync_files($channel, $files) {
continue;
}
$redirects = 0;
- $x = z_post_url($fetch_url,$parr,$redirects,array('filep' => $fp));
+
+
+ $headers = [];
+ $headers['Accept'] = 'application/x-zot+json' ;
+ $headers['Sigtoken'] = random_string();
+ $headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
+
+ $x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
fclose($fp);
if($x['success']) {