Photo upload, Download

Ads
 

Photo upload, Download

Hi

I am using NetBeans IDE for developing application for java(Swings). And i am using MySQL as backend database.

My Problem is I have created JFrame form in NetBeans and i have inculded label in which i am loading photo.

BufferedImage image=null;
    JFileChooser chooser = new JFileChooser();
    chooser.setAcceptAllFileFilterUsed(false);
    int retVal = chooser.showOpenDialog(this);
    if (retVal == JFileChooser.APPROVE_OPTION) {
        File myFile = chooser.getSelectedFile();
        try {
            image = ImageIO.read(myFile);
            try
            {
                lblPhoto.setIcon(new ImageIcon(image));

            }
            catch(Exception e)
            {
                    JOptionPane.showMessageDialog(this, "Select picture format only(JPEG,PNG,BMP,GIF): ");
            }
            path=myFile.getAbsolutePath();
        }
        catch(Exception e) {
            JOptionPane.showMessageDialog(this, "MemberMasterGUI.browsePhoto: " + e.getMessage());
        }
    }

Here I'll get path of the photo in local machine in variable "path" (I dont know whether this code proper) . My question is how can i load this to the server machine so that this photo photo can be accessed in all of the machines from server side. I want to save the photo with a given name. How can i do it.

Should i have to wrirte socket program for thjis. If yes how to write it. Otherwise what is the solution to this. Please someone help me to do this. Please i need it as soon as possible.

Thanks a lot.

View Answers

Ads









Related Tutorials/Questions & Answers:
Photo upload, Download
Photo upload, Download  Hi I am using NetBeans IDE for developing... am loading photo. BufferedImage image=null; JFileChooser chooser = new...()); } } Here I'll get path of the photo in local machine in variable "path" (I
upload photo in xcode
upload photo in xcode  how can i upload a photo in a view in xcode? i am a beginner in xcode please help me
Advertisements
Upload Photo to Server
Upload Photo to Server  Hi I am using NetBeans IDE for developing... i am loading photo. BufferedImage image=null; JFileChooser chooser...()); } } Here I'll get path of the photo in local machine in variable "path
upload and download mp3
upload and download mp3   code of upload and download Mp3 file in mysql database using jsp and plz mention which data type used to store mp3 file in mysql database
Upload and Download multiple files
Upload and Download multiple files  Hello Sir/Madam, I need a simple code for upload and download multiple files(it may be image,doc... link: http://www.roseindia.net/jsp/file_upload/uploadingMultipleFiles.shtml
upload and download video
upload and download video  how to upload and download video in mysql...;Display file upload form to the user</TITLE></HEAD> <BODY> <FORM...;center><td colspan="2"><p align="center"><B>UPLOAD THE FILE<
Upload and Download Large files in jsp
Upload and Download Large files in jsp  I am not able to download large files (>200mb) from any server. I need a code to download and upload large files (atleast 4 gb) to a server using jsp page
How to upload and download file in hadoop?
How to upload and download file in hadoop?  Hi, I am trying to learn to upload the file on the Hadoop HDFS and then download the same file for learning the process. How to upload and download file in hadoop? What
how to upload and download images in java?
how to upload and download images in java?  what is the code for uploading and downloading images in java? how do I make a photo gallery through JSP....   Upload and Download images: 1)page.jsp: <%@ page language="java
how to upload and download images using buttons in jsp?
how to upload and download images using buttons in jsp?  how to upload and download images using buttons in jsp
upload and download a file - Java Beginners
upload and download a file  how to upload a file into project folder in eclipse and how to download the same using jsp   Hi Friend, Try the following code: 1)page.jsp: Display file upload form to the user
photo uploading
photo uploading  i want the code upload the image in oracle database
i want image upload and download useing STRUTS 1.2 version example..
i want image upload and download useing STRUTS 1.2 version example..  i am fresher of the developer..i want code for above title topic(i want image upload and download useing STRUTS 1.2 version example..)..plz send me code for my
Creat a folder, inside it upload and download files in jsp and mysql
Creat a folder, inside it upload and download files in jsp and mysql  Create one or more folder .inside it we can upload and download multiple files   Here is an application that will upload the file and save
photo album
photo album  while syncing photos to my photo album in my iphone, the photo albumj ust got crashed i guess. Under photos option i just have the camera roll option now!! What should i do to get the photo album back
photo viwer
photo viwer  i need coding for photo viewer using jsp mysql   Please visit the following link: http://www.roseindia.net/jsp/downloadimage.shtml
UPLOAD
UPLOAD  how to upload image using html
Gallery Photo
Gallery Photo  I need to display a photo gallery with the path stored in oracle with the possibility of their supprission (photo management) (with jsf or with jsp)   hi friend, Do not do such task using JSP, Better
Download
Download JDK  How to Download the latest Version of JDK?   Download OST to PST converter from: http://www.osttopst.info
Download.
Download.  I need a swing program to download a file from the server
Adding photo to iPhone simulator
Adding photo to iPhone simulator  Hi, there is no photo in my iPhone simulator.. how can i add one? Please suggest. Thanks
upload video
upload video  hi sir i want to code of upload and download video in mysql database using jsp... and plz give advice which data type is used to store video in table
save uiimage to photo library
save uiimage to photo library  How to saved the clicked picture on camera roll in iPhone. I always want to write the file into photo library.   Save UIImage to photo library Creating a camera application in iPhone need
File Download in jsp
File Download in jsp  file upload code is working can u plz provide me file download
ModuleNotFoundError: No module named 'mera_photo'
ModuleNotFoundError: No module named 'mera_photo'  Hi, My Python... 'mera_photo' How to remove the ModuleNotFoundError: No module named 'mera_photo' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'natgeo_photo'
ModuleNotFoundError: No module named 'natgeo_photo'  Hi, My Python... 'natgeo_photo' How to remove the ModuleNotFoundError: No module named 'natgeo_photo' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'natgeo_photo'
ModuleNotFoundError: No module named 'natgeo_photo'  Hi, My Python... 'natgeo_photo' How to remove the ModuleNotFoundError: No module named 'natgeo_photo' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'photo-org'
ModuleNotFoundError: No module named 'photo-org'  Hi, My Python... 'photo-org' How to remove the ModuleNotFoundError: No module named 'photo... have to install padas library. You can install photo-org python with following
ModuleNotFoundError: No module named 'photo-calendar'
ModuleNotFoundError: No module named 'photo-calendar'  Hi, My... named 'photo-calendar' How to remove the ModuleNotFoundError: No module named 'photo-calendar' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'photo-dl'
ModuleNotFoundError: No module named 'photo-dl'  Hi, My Python... 'photo-dl' How to remove the ModuleNotFoundError: No module named 'photo-dl... to install padas library. You can install photo-dl python with following
ModuleNotFoundError: No module named 'photo-gen'
ModuleNotFoundError: No module named 'photo-gen'  Hi, My Python... 'photo-gen' How to remove the ModuleNotFoundError: No module named 'photo... have to install padas library. You can install photo-gen python with following

Ads