Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-35542 Fixed a bug when trying to directly link to a file from Dro…

…pbox
  • Loading branch information...
commit a7783bf260d28c7ea781db36d8c657b27810554a 1 parent c366bea
Marina Glancy marinaglancy authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 repository/dropbox/lib.php
4 repository/dropbox/lib.php
View
@@ -506,6 +506,10 @@ public function supported_returntypes() {
*/
public function get_link($reference) {
$ref = unserialize($reference);
+ if (!isset($ref->url)) {
+ $this->dropbox->set_access_token($ref->access_key, $ref->access_secret);
+ $ref->url = $this->dropbox->get_file_share_link($ref->path, self::GETFILE_TIMEOUT);
+ }
return $this->get_file_download_link($ref->url);
}
Please sign in to comment.
Something went wrong with that request. Please try again.