Forum Discussion

ArjitKapoor's avatar
ArjitKapoor
New member | Level 2
8 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?

1 Reply

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!