1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

To get shared link to the file uploaded to dropbox with Laravel

Discussion in 'PHP' started by mstdmstd, Dec 22, 2017.

  1. #1
    Hello,
    In laravel 5.5 application I need to upload file to dropbox and get shared link to this file.

    I used DropboxAdapter library and this doc https://murze.be/dropbox-will-turn-off-v1-of-their-api-soon-its-time-to-update-your-php-application
    And looking at this doc
    https://laravel.com/docs/5.5/filesystem#retrieving-files

    I managed to put a file to dropbox storage ok, but failed to get its url.
    I did like :

    $exists = Storage::disk('dropbox')->exists($dest_dropbox_file_name);
    echo '<pre>$exists::'.print_r($exists,true).'</pre>'; // Value is 1$url = Storage::disk('dropbox')->url($dest_dropbox_file_name);
    echo '<pre>$url::'.print_r($url,true).'</pre>';
    PHP:
    I got error:
    RuntimeException
    This driver does not support retrieving URLs.
    Code (markup):


    Which is the right way to get shared url of uploaded filr to dropbox?
    Who used this library ?

    Thanks!
     
    mstdmstd, Dec 22, 2017 IP
  2. mstdmstd

    mstdmstd Well-Known Member

    Messages:
    130
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #2
    Hello,
    I still search for a decision, as I still have an error:

    This driver does not support retrieving URLs.
    when I try to get shared url of uploaded file.

    I created a small application, repeating the error I have.
    Public url:
    https://www.dropbox.com/s/rmclue63tyeyu1w/dropbox_demo.zip?dl=0


    Under home url there is “Run drop box” menu item and clicking on it the routing would be run.
    I output to the console all related variables.

    I hardcoded app's key/secret in the HomeController.php and in the config/app.php files.
    If there is no error in the code,
    please, try to run under your dropbox creditials. Could it be misconfiguration on dropbox side of my account?


    Thank you for your time!
     
    mstdmstd, Jan 19, 2018 IP