Click here to Skip to main content
15,068,988 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am working on a project in which i have to upload a PDF file and then convert it to image (png image for each page of doc.).After conversion is done i want to show the images(which is stored in a temp folder) in the same page as image gallery preview(for this purpose i used GALLERIA.js). but i could not get the preview as needed. the images couldnt be loaded.
here is what i have tried on my VIEW
C#
<div style="float:right ; width:500px">
 <div id="galleria" style="height: 320px;">
 @{
     var temp_path = System.Web.HttpContext.Current.Server.MapPath("~/temp/"); //Path.GetTempPath();
    DirectoryInfo thisdir = new DirectoryInfo(temp_path);

    Directory.GetFiles(temp_path);
    
    int i=1;
    foreach (FileInfo fInfo in thisdir.GetFiles("*.png", SearchOption.AllDirectories))
    {
        
      
           <a href="@fInfo.FullName">
                <img title="@fInfo.Name"
                     src="@fInfo.FullName">

            </a>

    
    }
    }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900