<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to display an image from Dropbox folder to MVC razor view in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-an-image-from-Dropbox-folder-to-MVC-razor-view/m-p/299387#M18186</link>
    <description>&lt;DIV class="votecell post-layout--left"&gt;&lt;DIV class="vote"&gt;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&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="post-text"&gt;&lt;P&gt;My Controller Action:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="kwd"&gt;public&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;ActionResult&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;ThreatsOverviewView&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;()&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="typ"&gt;Models&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ThreatsOverviewModel&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; tom &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Models&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ThreatsOverviewModel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;();&lt;/SPAN&gt;
        &lt;SPAN class="typ"&gt;List&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;SelectListItem&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; imgName &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ImageName&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="kwd"&gt;string&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; accesstkn &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; 
                &lt;SPAN class="typ"&gt;ConfigurationManager&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;AppSettings&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"DropboxAccessToken"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;                tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;dbxuser &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;DropboxClient&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;accesstkn&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;                tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;dbxuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Files&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;GetThumbnailAsync&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"RootCauses.png"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;    
                &lt;SPAN class="com"&gt;//Task task  = ListRootFolder(dbxuser);&lt;/SPAN&gt;
                &lt;SPAN class="kwd"&gt;return&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;View&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;
            &lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;How to display the image in the razor view?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 May 2019 09:10:10 GMT</pubDate>
    <dc:creator>ArjitKapoor</dc:creator>
    <dc:date>2019-05-29T09:10:10Z</dc:date>
    <item>
      <title>How to display an image from Dropbox folder to MVC razor view</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-an-image-from-Dropbox-folder-to-MVC-razor-view/m-p/299387#M18186</link>
      <description>&lt;DIV class="votecell post-layout--left"&gt;&lt;DIV class="vote"&gt;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&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="post-text"&gt;&lt;P&gt;My Controller Action:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="kwd"&gt;public&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;ActionResult&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;ThreatsOverviewView&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;()&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="typ"&gt;Models&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ThreatsOverviewModel&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; tom &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Models&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ThreatsOverviewModel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;();&lt;/SPAN&gt;
        &lt;SPAN class="typ"&gt;List&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;SelectListItem&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; imgName &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ImageName&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="kwd"&gt;string&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; accesstkn &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; 
                &lt;SPAN class="typ"&gt;ConfigurationManager&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;AppSettings&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"DropboxAccessToken"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;                tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;dbxuser &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;DropboxClient&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;accesstkn&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;                tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;dbxuser&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Files&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;GetThumbnailAsync&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"RootCauses.png"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;    
                &lt;SPAN class="com"&gt;//Task task  = ListRootFolder(dbxuser);&lt;/SPAN&gt;
                &lt;SPAN class="kwd"&gt;return&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;View&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;tom&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;
            &lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;How to display the image in the razor view?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2019 09:10:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-an-image-from-Dropbox-folder-to-MVC-razor-view/m-p/299387#M18186</guid>
      <dc:creator>ArjitKapoor</dc:creator>
      <dc:date>2019-05-29T09:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to display an image from Dropbox folder to MVC razor view</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-an-image-from-Dropbox-folder-to-MVC-razor-view/m-p/299403#M18190</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/52523055/how-to-display-an-image-from-dropbox-to-mvc-razor-view" target="_blank"&gt;https://stackoverflow.com/questions/52523055/how-to-display-an-image-from-dropbox-to-mvc-razor-view&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;Using &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetThumbnailAsync_1.htm" target="_blank"&gt;the&amp;nbsp;GetThumbnailAsync method&lt;/A&gt;&amp;nbsp;is the right way to get the thumbnail data for an image file. That works the same way as the&amp;nbsp;DownloadAsync method, for which there is an example here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L407" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L407&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;What you do with the thumbnail data is up to you, depending on what you want your app to do exactly, and how. For example, you may need to save it to the local filesystem to be read later, or you may need to return it directly to some other part of your app.&lt;/P&gt;
&lt;P&gt;Also,&amp;nbsp;"RootCauses.png" wouldn't be a valid path. File paths should start with a "/", so it would be something like "/RootCauses.png" or&amp;nbsp; "/FolderName/RootCauses.png", etc. You can also get the path from a file metadata object, using &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/P_Dropbox_Api_Files_Metadata_PathLower.htm" target="_blank"&gt;the Metadata.PathLower property&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 19:17:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-display-an-image-from-Dropbox-folder-to-MVC-razor-view/m-p/299403#M18190</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-09-26T19:17:43Z</dc:date>
    </item>
  </channel>
</rss>

