aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/File_upload.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-20 21:24:58 -0700
committerzotlabs <mike@macgirvin.com>2017-08-20 21:24:58 -0700
commit31e62bd19e2fcfe70487ab38ee6b688e48a79c95 (patch)
tree69a4b2308cf0dac50001ee012eb7405cd1969c31 /Zotlabs/Module/File_upload.php
parent52c6ea51152b6255b45ffb68181fa63413a6fffc (diff)
downloadvolse-hubzilla-31e62bd19e2fcfe70487ab38ee6b688e48a79c95.tar.gz
volse-hubzilla-31e62bd19e2fcfe70487ab38ee6b688e48a79c95.tar.bz2
volse-hubzilla-31e62bd19e2fcfe70487ab38ee6b688e48a79c95.zip
a few file activities were not getting synced
Diffstat (limited to 'Zotlabs/Module/File_upload.php')
-rw-r--r--Zotlabs/Module/File_upload.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/Zotlabs/Module/File_upload.php b/Zotlabs/Module/File_upload.php
index bce81ad7a..5c4b9a502 100644
--- a/Zotlabs/Module/File_upload.php
+++ b/Zotlabs/Module/File_upload.php
@@ -35,11 +35,25 @@ class File_upload extends \Zotlabs\Web\Controller {
if($_REQUEST['filename']) {
$r = attach_mkdir($channel, get_observer_hash(), $_REQUEST);
- if($r['success'])
+ if($r['success']) {
+ $hash = $r['data']['hash'];
+
+ $sync = attach_export_data($channel,$hash);
+ if($sync) {
+ build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ }
goaway(z_root() . '/cloud/' . $channel['channel_address'] . '/' . $r['data']['display_path']);
+
+ }
}
else {
$r = attach_store($channel, get_observer_hash(), '', $_REQUEST);
+ if($r['success']) {
+ $sync = attach_export_data($channel,$r['data']['hash']);
+ if($sync)
+ build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+
+ }
}
goaway(z_root() . '/' . $_REQUEST['return_url']);