my dog learned polymorphism*
The moose likes Beginning Java and the fly likes BulkUpload from a remote computer to the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "BulkUpload from a remote computer to the server" Watch "BulkUpload from a remote computer to the server" New topic
Author

BulkUpload from a remote computer to the server

faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
hi ,
i am working on .wav file bulk upload and for that i am using DiskFileUpload.

The user will give me the names of the files along with the absolute path on its local machine in a file.

now i have to read that file , get the names and the paths for the .wav files on the user's local machine and upload them with that name on the remote server.

something like this

there is a abc.txt(suppose) file containing the name and the path of the .wav files

name absolute path
music1, c:\music1.wav
music2, c:\music2.wav
music3, c:\music3.wav

now he will give me this abc.txt file , i have to read abc.txt and upload the files.


my problem is how to i get the stream object remotely , locally i am able to do by using this

InputStream in = new FileInputStream(absolutepath);


help me !!!


regards
Dan Walin
Ranch Hand

Joined: Nov 11, 2003
Posts: 109
Wouldn't FTP be an option?
faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
Sorry Dan , but i cannot use ftp , i have to do on http
parshuram bingi
Greenhorn

Joined: Aug 01, 2006
Posts: 10
If your client is always from the same machine then, one option can be that you can map a drive from where you are running the code and use the drive letter as if the file is local to the machine.

-parshuram.


Hard Work, Honesty(2H) pays...
faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
sorry to say parshuram , but even that is not option , it has to be the way, i posted initially


thanks though for giving your time and concern
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9924
    
158

my problem is how to i get the stream object remotely , locally i am able to do by using this

InputStream in = new FileInputStream(absolutepath);


Does this help: Read a file from Remote system


[My Blog] [JavaRanch Journal]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: BulkUpload from a remote computer to the server
 
Similar Threads
how to upload a file from local machine to a servlet in the server
Uploading files to the current directory.
Web Application Configuration Question
Upload using HTTP Protocol
File Reading using J2ME