Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Photo upload, Download
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Vaishnavi Vishwanath
Photo upload, Download
0 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


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.


Advertisement
View Answers

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
PHOTO UPLOAD AND DISPLAY - Struts
PHOTO UPLOAD AND DISPLAY  Hi, This is chandra Mohan. I want some help urgently from your side. My problem is I want to upload the photos and display photos usin Struts technology. Please give me some suggestion to me
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
Photo Upload - JSP-Servlet
Photo Upload  Dear Sir, I want some help you i.e code for image upload and download using Servle/jsp. Thanks&Regards, VijayaBabu.M ...(); %> You have successfully upload the file by the name
Upload photo - Java Beginners
Upload photo  Morning, Can you tell me coding how to upload photo. First, i want to browse the photo from my direktory(*.jpg, *.bmp *.gif), then i click this photo and view in my JFrameForm then i have a button to save
how to upload photo - Java Beginners
how to upload photo  dear sir, I has a case like that, first i have jlabel. i want to view data like photo/picture to jlabel. then i have a button...{ public static void main(String[] args){ JFrame frame = new JFrame("Upload Image
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<
file upload download - Java Beginners
file upload download  how to upload and download files from one system to another using java.io.* and java.net.* only please send me code
upload and download files - JSP-Servlet
upload and download files  HI!! how can I upload (more than 1 file) and download the files using jsp. Is any lib folders to be pasted? kindly... and download files in JSP visit to : http://www.roseindia.net/jsp/file_upload
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 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
Upload and Download in JSP - JSP-Servlet
Upload and Download in JSP  Respected Sir/Madam, I am... and downloading a file in JSP.. When the admin clicks upload, he must be able to upload files and similarly when the user clicks the download option, he must be able
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
Upload and download file - JSP-Servlet
Upload and download file  What is JSP code to upload and download a document in a web page?  Hi Friend, Try the following code to upload the word document file: 1)page.jsp Display file upload form
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
photo uploading
photo uploading  i want the code upload the image in oracle database
File Upload And download JSP Urgent - JSP-Servlet
File Upload And download JSP Urgent  Respected Sir/Madam, I... Download in JSP.. In the Admin window, There must be "Upload" provision where admin can upload files.. And in the user window, There must be a "Download" provision
java code to upload and download a file - Java Beginners
java code to upload and download a file  Is their any java code to upload a file and download a file from databse, My requirement is how can i... and Download visit to : http://www.roseindia.net/jsp/file_upload/index.shtml http
code to upload and download a file - Java Magazine
code to upload and download a file  Is their any code to upload a file and download a file from databse, My requirement is how can i store two... user send one a.doc file to x ,he has to download his a.doc another user sends
upload ,download and update file document - JDBC
upload ,download and update file document   hi sir.i am creating one application in jsp in which i need to upload the word document file which... to upload the word file: 1)page.jsp Display file upload form
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
upload and download all kinds of files in jsp - Java Beginners
upload and download all kinds of files in jsp  how to upload and download all kinds of files ex: image file,pdf,.xls in jsp. your help is highly appreciated.  we can upload the all type s of files into oracle 10g
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
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 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 and download files from ftp server using servlet - Ajax
upload and download files from ftp server using servlet  Hi,Sir Sorry for my complex questions. My problem is that I don't know client side script for upload and download files from ftp server using servlet and how to use
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
photo gallery - Java Beginners
photo gallery  Iam uploading images in the serverusing uploading... it dynamically with out giving the path. please help  Hi friend, For upload image visit to : http://www.roseindia.net/jsp/file_upload/employee_upload
Advertisements
 

 

 

DMCA.com