Hello,
I uploaded videos in my gallery.
I installed and tried the VideoJS, Charlie's content and JPlayer plugins.
The video is displayed and plays correctly.
When I click on the download button/link the video is displayed in a new window/tab, instead of being downloaded (like zip downloaded).
I would like to force the download of the mp4 and mov formats (i.e. zip) instead of displaying them in the browsers.
I want to alter this behavior, which directions do you suggest?
Should I modify picture.php (if file extension=movie, then...) or write a plugin?
Thanking you in advance.
Piwigo version: 2.8
PHP version: 5.6.19
MySQL version: 5.5.44
Piwigo URL: http://
Last edited by torode (2016-03-23 10:12:21)
Offline
Hi torode,
[Github] Piwigo issue #415
Offline
Merci pour l'info Pierrick !
From what I understand, the use of readLargeFile is to avoid a crash of php due to a very large file, does it also force the video file to be zipped instead of being displayed in a browser window?
Is there a work around considering the video extensions as picture or file extensions for the download workflow only?
Offline
Hello!
I found a temporary hack.
First, create a tmp directory (/tmp).
Open picture.php, line 535, search for:
{ // not a pic - need download link
$row['download_url'] = $row['element_url'] = get_element_url($row);;
}
replace it with:
{ // not a pic - need download link
$zip = $row['element_url'] = get_element_url($row);;
$tmpzip = './tmp/'.uniqid(rand()).'.zip';
exec("zip -j $tmpzip $zip");
$row['download_url'] = $tmpzip;
}
Offline