You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Amicao's avatar
Amicao
Explorer | Level 3
3 years ago

How to get a temporary link from file that was uploaded via Dropbox API

Hello, good afternoon for all, i am here again for other problem related to get temporary link from file.   I made a Laravel system using the Dropbox API to get a file from user, upload it and la...
  • Здравко's avatar
    3 years ago

    Amicao wrote:

    ... a file from user, upload it and later, get a access for this file and delete it if necessary. The problem is that upload the file and Dropbox change the file name to a own Dropbox hash system. ...


    Hi Amicao,

    It's good idea to you share some piece of your algorithm able to reproduce the issue. Generally Dropbox API doesn't change file name if there is no other file already existing with the same name on the same place (path). Even when such file exist it can be updated, depending on your intention, upload can fails, or automatically rename it (whatever appropriate).

     


    Amicao wrote:

    ... And it difficult me to get the temporary link automatically via Laravel, because my system don't know now my file name automatically. ...


    On successful file upload (either with changed or intended name) actual name gets as a part of the API access point result (take a look on /2/files/upload Returns section, for example). So you (your system) definitely know how your file gets named and the file id too. Using this you can pass it to the 2/files/get_temporary_link call.

     


    Amicao wrote:

    ... Does exist a way to me disable the file name name alteration? ...


    Take a look on "mode" parameter for possible alternatives.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API

Make connections with other developers

797 PostsLatest Activity: 6 days ago
199 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!