Forum Discussion

Bonetooth's avatar
Bonetooth
New member | Level 2
5 years ago

Asp.Net File Delete

Good Afternoon

 

I am trying to delete an uploaded image from my dropbox account via the api v2 on visual studio. I'm attempting to use Deletev2Async, however the path I'm sending is incorrect. When uploading an image, i'm storing the url that let's me show the image on my database but when using that I keep getting errors on the path.

 

[Edit]

Nvm Solved it. Thanks Anyway :)

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    I'm glad to hear you already sorted this out.

     

    For anyone else who comes across this with the same issue, note that to delete a file via the API, you should supply the Dropbox path of the file, not the URL. For example, when calling DeleteV2Async, you can supply the Metadata.PathLower or FileMetadata.Id value as the "path" parameter.

  • Bonetooth's avatar
    Bonetooth
    New member | Level 2

    For my solution, I saved the image name with extension and for the DeleteV2Async put:

     

    "/Images/" + that image name

     

    And it worked :)