VintaSoft Annotation .NET Plug-in Discussions

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Loading an image from a different directory than the application is running



Loading an image from a different directory than the application is running

Post by david.morrison »

I am trying to use annotationViewer1.get_Images().openFile(filename, fileLoadComplete, fileLoadError);
to load an image. As long as filename is under the application base folder (c:\inetpub\wwwroot\sitename\Images\image1.png), it works fine. How can I load an image from a different filepath, such as a completely different drive (e:\Images\image1.png)?
If I try passing the full filepath "e:\Images\image1.png" to the openFile() method it gives an error: "The given path's format is not supported".


Re: Loading an image from a different directory than the application is running

Post by Alex »

Hello,

By default web viewer can open image file if image file is stored in application folder on server side.

In your case image file is not stored in application folder on server side. In this case you can go by 2 ways.

WAY 1: Copy image file to the application folder.

WAY 2: Create custom data storage and override algorithm that load file data. Please read how to view images from database here: https://www.vintasoft.com/docs/vsimagin ... abase.html Use this example and use custom file folder instead of database access.

Let me know if you will have any question or problem.

Best regards, Alexander


Page 1 from 1: 1