/    Sign up×
Community /Pin to ProfileBookmark

FTP URL Syntax for file upload ??

I wonder if anyone can help.

I am currently writing a web application. I have both a HTTP server and an FTP server up and running; and I need my website users to be able to upload files to my FTP server.
No problem I hear you say – just configure the FTP server to allow uploads – either anonymous or authenticated.

Ha ! – not that simple I’m afraid !
I want this app to be really neat and dead simple for my users to use. Along with the file upload, via an HTML form I need to capture their name, a description of the file, who it is destined for etc.

The action of the form should store these details in a database (no problem, I have that part in place and working), and then ‘kick off’ the FTP upload.
My form can easily capture the local filename of the file to upload with an <input type=”file”> tag – so the back end processor that receives this form knows the uploaders name, file description etc, and the filename. It then writes its record into the database, returns a HTML page saying “Thanks for the upload …”, and spawns a new browser window whose URL is the FTP upload.

I am doing exactly this for FTP downloads – works great – and now I need to do the same thing for uploading.

Now, there are some ‘givens’ in this – some things I cannot change. The main one is that I have to use FTP for file transfers. We are talking about very large file transfers and HTTP is not up to the job of it – so that counts out using ENCTYPE=”multipart/form-data” on the <form tag.

Also, I need this to be a really neat solution – so I dont want to spawn the new browser window that simply logs the user into the FTP server so that they can drag and drop into it.
I want to do it all from the one form – you know, the idea of one click file uploads (exactly like you would get with ENCTYPE=”multipart/form-data” on the <form tag – but using FTP not HTTP)

A tall order I know – any ideas anyone ??

Any input on this would be very much appreciated.
Cheers

Nathan

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@nathan_russellauthorFeb 13.2003 — [i]Originally posted by Dave Clark [/i]

[B]As supplied, the browser cannot do FTP file uploads.[/B][/QUOTE]


Yeah, thats what I thought originally, but some (lots !!) of hunting the internet and reading around leads me to think otherwise.

I found the official RFC for URLs (RFC1738 - http://www.w3.org/Addressing/rfc1738.txt) which goes into great detail about how URLs are composed and what each component does - and there is a whole section on FTP URLs (section 3.2).

And right near the end of that section it says:
FTP URLs may also be used for other operations; for example, it is possible to update a file on a remote file server, or infer information about it from the directory listings. The mechanism for doing so is not spelled out here.[/QUOTE]
I especially like the last sentance !

So, if anyone can shed any more light on this it would be very much appreciated.

Cheers

Nathan
Copy linkTweet thisAlerts:
@BriCFeb 26.2010 — Hi,

Re: FTP uploads via the URL.

I know it's a long time ago, but I wondered if you ever resolved this problem?

It's exactly the issue I have at the moment, so any help or insights would be greatly appreciated.

Cheers,

Brian.
×

Success!

Help @nathan_russell spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...