File Uploader

Hello

I want to easily upload files to my web server, without the use of annoying web forms. So far, I have created a drag and drop application that I can drag files onto, and information of the corresponding file is displayed. I want to develop this further so that whatever file I drag onto the window, will be uploaded to my web server. For this, I need the application to log into my account on the host site, and send the file to the public-html folder in my web server. A progress bar to show upload progress would be good also, but for now, I'd appreciate some information on how to upload a file.

Any help is very much appreciated!

:)

[668 byte] By [Fergala] at [2007-11-27 10:18:44]
# 1

Can anyone help me? I just need to know how to make an application that will upload a selected file to a web server. Please help.

Fergala at 2007-7-28 16:53:21 > top of Java-index,Desktop,Deploying...
# 2

...

> I want to easily upload files ..

'You personally', or anyone you should choose

to 'authorise'?Note the first is much simpler

than the second!

>..to my web server,

> without the use of annoying web forms.

Hear, hear! Thin clients suck.

>..So far, I have

> created a drag and drop application that I can drag

> files onto, and information of the corresponding file

> is displayed. I want to develop this further so that

> whatever file I drag onto the window, will be

> uploaded to my web server. For this, I need the

> application to log into my account on the host site,

> and send the file to the public-html folder in my web

> server. A progress bar to show upload progress would

> be good also, but for now, I'd appreciate some

> information on how to upload a file.

I'd have answered this sooner, except most

of the answer is not to a web start question!

What my advice breaks down to, is this.

Make an application that can upload files to a

site*, then wrap web start around it**.

This is because most of this can be done using

a standard application, that is the 'hard part',

and 'uploading a file' is better investigated on

more specific forums***.

* I am not very experienced with uploading files

programmatically, but it seems there might be a

number of ways -

- Call the Ant FTP task - kludgy, but relatively simple,

and should be easy if Ant is already installed.

- Use an FTP API

- Use HttpClient to mediate between the app. and server.

** Once you have a working application, it should

be relatively simple to deploy it using web start.

If the codebase is the same server as the upload

target, it might be possible to deploy the app. in

a sandbox (no code signing required), so long as you

convert the File operations to use the JNLP based

FileContents etc.

*** Sun does not seem to have forums very specific

to this task, but more on track are..

Core APIs - Networking

http://forum.java.sun.com/forum.jspa?forumID=536

This is a very generic networking forum, but there

might be some FTP gurus lurking.

These forums are more related to using Java on the

server side to accept the uploaded file, but if

the server already has FTP functionality, it would

be redundant..

Java Technologies for Web Services

http://forum.java.sun.com/forum.jspa?forumID=331

Other Security APIs, Tools, and Issues

http://forum.java.sun.com/forum.jspa?forumID=60

If you have no luck on those, try posting to

one of the more generic usenet newsgroups, like

comp.lang.java.programmer - they should be able

to throw some ideas your way.

HTH

AndrewThompson64a at 2007-7-28 16:53:21 > top of Java-index,Desktop,Deploying...