I recently installed owncloud on my server and it is great!
But I want to modify the manner the share URL is generated. Where can I find the file responsible for creating that URL?
The URL itself seems to be hardcoded (eww…) in the file sharing API:
$url = \OCP\Util::linkToPublic('files&t='.$token);
If you would like to change how the token is generated, see this function.
public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null) { …
More specifically this line:
$token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate( …
apps/files_sharing/lib/api.php
but couldn't find the lines you gave me.
Dec 5, 2014 at 19:46
linkToPublic('files&t='.$token);
part, I'm sure you'll find it.
$url
the full url as http://dl.xxxx.org/public.php?service=files&t=4617c2d4e806fa0d8bf6f47e4123f695
in my case? Or is only a part of it?
Dec 5, 2014 at 19:55