-2

I am in the process of generating a photo viewer (online/networked) that our artists can update a directory with sub directories creating a dynamic viewer, allowing others to view it. Currently we are using a SVN system but there are some machines that do not have the repo so it's not an option to use it.

What I am doing: recursively checking a given directory and populating a page (of sorts) with images and a "link" structure Each Directory will create a tab and inside that tab the .png files will populate a window, each artist will have access to this directory and can add and remove anything, the code will generate the window

Some ideas I have on allowing artists to view these images:

  • I created a C# HtmlTextWriter mockup viewer, the disadvantage to this is I have to pack the images with the HTML index.
  • I have access to google websites API (wiki) but looking it over it's not the best way of creating what I need. And I need to release a tool to update the wiki, when there are changes, does anyone know if there is a FTP system for google websites that can act as a generator for these images?
  • I have access to a secure shared network folder, I could create a HTML src pointing to the shared.
  • I might be able to get a company DB but it's a lot of work for a little viewer.

Is there anything that you could suggest? Or am I missing some other suggestion, Just looking for some good ideas or tools.

Thanks in advance!

i73
  • 55
  • 11

2 Answers2

0

So, let me make sure I understand this right. Your looking to iterate through a directory using C#

https://msdn.microsoft.com/en-us/library/bb513869.aspx

Then load each of these files into a control..

https://forums.asp.net/t/1403723.aspx?Dynamically+adding+images+to+page+from+code+behind+

Then allow the user to upload files.

JavaScript: Upload file

And allow the user to remove a file.

How to delete a specific file from folder using asp.net

(You can remove the file using the code above, but remember, when the user pushes some sort of delete button, they will have to be submitted to another page so that C# server side code can delete the file. Client side code cannot delete the file.)

I hope this has pointed you in the right direction. If I had the ability to comment, this would've gone into a comment.

Community
  • 1
  • 1
S. Walker
  • 2,005
  • 6
  • 25
  • Hey thanks for your post, I was looking for suggestions on how to handle this problem, I realize now Stack is not a good place to have a discussion about these sorts of things. I already was generating the pages from C# but have since moved to a web server and PHP. – i73 Dec 22 '16 at 01:07
0

I created a web server on a VM installed PHP and generated a page for each folder and populated them with the content (If there was images) while using a HTTP GET method to traverse the folder structure.

$root = "";
if($_GET["directory"] != null)
    $root = getcwd() . "/share" . $_GET["directory"] . "/";
else
    $root = getcwd() . "/share";

if (is_dir($root)){
    if ($dh = opendir($root)){
        while (($file = readdir($dh))){
            if($fileExtension->getExtension() == "png")
                print "<a href= '" . $fileDirectory . "'><img src='" . $fileDirectory . "' width = '375px' height='499'/></a>";
            else
                print "<a href='index.php?directory=" . $_GET["directory"] . "/" . $file . "'>" . $file . "</a><br>";
        }
    }
 }
i73
  • 55
  • 11