mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[api:url] fix #2808 supports onetime url for the external service
Add an option `onetimeUrl` of the volume root option.
`'onetimeUrl' => true`
or
`'onetimeUrl' => function($file, $options, $volumeInstance) { return 'String of onetimeurl'; }``
To enable onetime URL support.
This commit is contained in:
@@ -1139,6 +1139,9 @@ class elFinderVolumeBox extends elFinderVolumeDriver
|
||||
**/
|
||||
public function getContentUrl($hash, $options = array())
|
||||
{
|
||||
if (! empty($options['onetime']) && $this->options['onetimeUrl']) {
|
||||
return parent::getContentUrl($hash, $options);
|
||||
}
|
||||
if (!empty($options['temporary'])) {
|
||||
// try make temporary file
|
||||
$url = parent::getContentUrl($hash, $options);
|
||||
|
||||
Reference in New Issue
Block a user