![]() ![]() *Thumbnails will be saved to the file system automatically.Įxample MVC application is located at Version 3.0.0 UpdatesĬhanged. *Original uploaded images can be saved to the file system. You can downsize uploaded images as well as keep the original image if you want! Run the ASP.NET MVC5 application and see the result.Create image thumbnails from uploaded image files to help downsize large resolution images that need to be displayed on your website in a smaller resolution.Įxcellent addition for custom blog sites or any kind of site that allows image files to be uploaded. ![]() ImageViewer.get_Images().openFile( "VintasoftImagingDemo.pdf") open file from session folder and add images from file to the image viewer specify that image viewer depends from thumbnail viewer create image viewer var imageViewer = new .WebImageViewerJS( "WebImageViewer1Div") create thumbnail viewer var thumbnailViewer = new .WebThumbnailViewerJS( "WebThumbnailViewer1Div") New ( "vintasoft/api/MyVintasoftImageApi") New ( "vintasoft/api/MyVintasoftImageCollectionApi") New ( "vintasoft/api/MyVintasoftFileApi") specify web services, which should be used by Vintasoft Web Document Viewer VintaSoft Image Viewer Demo (ASP.NET MVC5) Here is HTML code that adds references to jQuery and Vintasoft JavaScript = null Add references to Vintasoft JavaScript files:.Open web view - file "Views\Default\Index.cshtml".This document will be displayed in image viewer. NET v12.1\Images\VintasoftImagingDemo.pdf" to the folder. Create folder "wwwroot\UploadedImageFiles\SessionID" and copy test PDF document.Client side: Add JavaScript code that displays image viewer.NET v12.1\Bin\JavaScript\" folder into "Scripts" folder. Copy and filesįrom "\VintaSoft Imaging.JQuery (version 3 or higher) file from any other source. NET v12.1\Examples\ASP.NET MVC\CSharp\AspNetMvcImagingDemo\Scripts\External\" folder or You can use jquery-3.4.1.min.js file from Copy jQuery (version 3 or higher) file into "Scripts" folder if "Scripts" folder does not contain jQuery file (jquery-3.X.1.min.js).Create "Scripts" folder if "Scripts" folder does not exist.Client side: Add Vintasoft JavaScript files to the project.Select "MVC 5 View" template, click "Add" button, set view name to "Index", uncheck "Use a layout page" checkbox and press the "Add" button => "Views\Default\Index.cshtml" file will be created.Open "DefaultController.cs" file, press the right mouse button on the "Index" method of DefaultController class and select the "Add View." menu from context menu.Client side: Create web view for displaying image and thumbnail viewer.RouteConfig.RegisterRoutes(RouteTable.Routes) GlobalConfiguration.Configure(WebApiConfig.Register) Here are source codes of MyVintasoftFileApiController class: Specify that MyVintasoftFileApiController class is derived from 2Controllers.VintasoftFileApi2Controller class.Select Empty API controller template, set the controller name to the "MyVintasoftFileApiController" and press the "Add" button.Press the right mouse button on the "Controllers" folder and select the "Add => Controller." menu from context menu.Create web service that allows to upload/download file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |