pwa-for-wp
pwa-for-wp copied to clipboard
Sharing Media in Progressive Web Apps
https://developers.google.com/web/updates/2018/12/web-share-target
Just managed to do it by adding these lines to your code in /pwa-for-wp/service-work/class-file-creation.php, line 477
$manifest['share_target'] = array(
'action' => '/my-target-link',
'method' => 'post',
'enctype' => 'multipart/form-data',
'params' => array(
'files' => array(
'name' => 'file',
'accept' => array('image/*')
)
)
);
Obviously you need to change "my-target-link" and mime type accordingly as well as writing server side code to handle the file.
One more user requested the same feature. https://github.com/ahmedkaludi/pwa-for-wp/issues/887
pushed in PWA for wp 1.7.71 and BuddyPress for PWA 1.4.3