Forum Discussion

ArjitKapoor's avatar
ArjitKapoor
New member | Level 2
7 years ago

How to display an image from Dropbox folder to MVC razor view

I am trying to access the Dropbox API and would like to display an image hosted on my dropbox server to display on my razor view

My Controller Action:

public ActionResult ThreatsOverviewView() {
        Models.ThreatsOverviewModel tom = new Models.ThreatsOverviewModel();
        List<SelectListItem> imgName = tom.ImageName;
        string accesstkn = 
                ConfigurationManager.AppSettings["DropboxAccessToken"];                tom.dbxuser = new DropboxClient(accesstkn);                tom.dbxuser.Files.GetThumbnailAsync("RootCauses.png");    
                //Task task  = ListRootFolder(dbxuser);
                return View(tom);
            }

How to display the image in the razor view?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 10 hours ago
351 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!