Click here to Skip to main content
15,894,540 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have one save button which will save the image in the desktop from camera when button is click below is the code.....

C#
<input id="Save" style="Z-INDEX: 1; LEFT: 8px; WIDTH: 128px; TOP: 36px; HEIGHT: 24px"
                                             önclick="return save_onclick()" type="button" value="Save Image" name="save">


function save_onclick()
    {
        document.AxuEyeCam.SaveImage("test.jpg");       
    }


It not good to save image in one pc because the image will not be available worldwide, it will be available for only to the pc which has image.

what i think is to save image in web application using mappath or store image in sql server or may be in cloud so that image will be available worldwide.

Can anybody suggest me how this is possible.

Thanks a lot
Posted

In ASP.Net you would use a FileUpload control that is in the AjaxControlToolkit. That will allow the user to send the file to your webserver and then you can save it wherever you want at that point. I would recommend saving the image into an images folder and then save the path to it in your SQl database.

Or, you can use apis that are already out there. I am sure you could google for image storage in the cloud and find some other options.
 
Share this answer
 
Comments
pratik_ce 9-Oct-13 7:28am    
Thanks a lot....but i want to save the image directly from camera not from fileupload control...so how this could be possible as in my question you can see image is saving but in local pc in the desktop....i want that in image folder so how these could be possible can you give me some code thanks
ZurdoDev 9-Oct-13 7:46am    
If you want an ASP.Net site then I would suggest googling to see if there is a jquery plugin that will do it. Or, if you want to make a Windows Forms app then you could take that approach.
pratik_ce 9-Oct-13 8:02am    
i try to find out but could not get any useful think...if you find anything with example then please let me know....thanks
ZurdoDev 9-Oct-13 8:08am    
How are you wanting to do it? As an ASP.Net app or Windows App?
pratik_ce 9-Oct-13 8:09am    
asp.net app.
Check this
Storing Uploaded Files in a Database or in the File System with ASP.NET[^](This has comparison File System vs Database - Advantages/Disadvantages, etc.,)

EDIT
------------
Use WebClient[^]
 
Share this answer
 
v3
Comments
pratik_ce 9-Oct-13 8:03am    
first i need to save the image from pc desktop into the web application so how that would be possible?
thatraja 9-Oct-13 8:53am    
Check updated answer
Using asp.net upload control to save file in a folder

VB
If UploadHeaderBanner.HasFile Then

                   Dim AttributesReadOnly = File.GetAttributes(Server.MapPath("~/images/header_banner.jpg"))
                   If AttributesReadOnly = FileAttributes.ReadOnly + FileAttributes.Archive Then
                       File.SetAttributes(Server.MapPath("~/images/header_banner.jpg"), IO.FileAttributes.Normal)
                   End If

                   FileExtension = UploadLoginImage.FileName
                   UploadHeaderBanner.SaveAs(Server.MapPath("~/images/header_banner.jpg"))
                   File.SetAttributes(Server.MapPath("~/images/header_banner.jpg), IO.FileAttributes.ReadOnly + FileAttributes.Archive)

               End If
 
Share this answer
 
I have done this same thing as a project, give me your mail address. I'll send you the project file
 
Share this answer
 

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