simple perl script for file uploads ?

J

Jack

Hi I am looking for a NON form based simple script that handles a file
upload on the server side.. does anyone have a pointer or an example
of how to do this ? I am working in HTML/Perl/Javascript ASP on IIS
and looking ideally to do without doing a "form post".

Thank you,

Jack
 
J

Joost Diepenmaat

Jack said:
Hi I am looking for a NON form based simple script that handles a file
upload on the server side.. does anyone have a pointer or an example
of how to do this ? I am working in HTML/Perl/Javascript ASP on IIS
and looking ideally to do without doing a "form post".

You seem to be talking about browsers. What is a "form post"? You can't
portably upload anything without using <FORM>s.

See CGI's upload() method. This section of the manual seems to describe
more or less the whole process:

http://search.cpan.org/~lds/CGI.pm-3.42/CGI.pm#CREATING_A_FILE_UPLOAD_FIELD
 
S

Sherm Pendley

Jack said:
Hi I am looking for a NON form based simple script that handles a file
upload on the server side..

Not possible as far as I know, since the only way to trigger a file
upload from a browser is with an HTML form. There's nothing you can
put on the server to get around that limitation.

sherm--
 
X

xhoster

Jack said:
Hi I am looking for a NON form based simple script that handles a file
upload on the server side.

So of the N possible user interfaces, where N is a very large number,
perhaps infinite, you are willing to work with any of the N-1 of them?

I think a better approach is to define what you want, not what you don't
want.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 
J

Jack

So of the N possible user interfaces, where N is a very large number,
perhaps infinite, you are willing to work with any of the N-1 of them?

I think a better approach is to define what you want, not what you don't
want.

Xho

--
--------------------http://NewsReader.Com/--------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

I want to add the ability to post a file from a browser to a server.
Example is craigslist where the user selects an image file and uploads
it to their servers. Thats it, its very simple and preferably not via
a form post since I am using that already with my ajax code thats
populating my HTML + perl logic into a form, and its advisable to only
post to one form, not more than 1.

Thank you,

Jack
 
J

Jack

I want to add the ability to post a file from a browser to a server.
Example is craigslist where the user selects an image file and uploads
it to their servers. Thats it, its very simple and preferably not via
a form post since I am using that already with my ajax code thats
populating my HTML + perl logic into a form, and its advisable to only
post to one form, not more than 1.

Thank you,

Jack- Hide quoted text -

- Show quoted text -

Hi I answered Xho's question. Can anyone help here with real example
Perl code (NOT CGI) that works for browser - server file uploads ?

thank you,

Jack
 
X

xhoster

By post you mean the POST method of HTTP?

I'm not familiar with that feature of Craig's list. You could look at the
page source and see how they do it.


What distinguishes a "form" POST from some other kind of POST?

What does it mean to POST to a form? Browsers usually POST *from* forms.

Who says that only this is advisable? Who is advising you?
Hi I answered Xho's question. Can anyone help here with real example
Perl code (NOT CGI)

In what way is Perl CGI not really Perl? If we are arbitrary not allowed
to use the best tool for the job, I have to wonder what else you will
arbitrarily disallow. Are we to spend our time coming up with solutions
using common modules, only to be told you don't those, either?
that works for browser - server file uploads ?

Browsers generally do not run Perl. If you want to get the browser to POST
without using the built-in (to the browser) HTTP form submission, then you
will need to use a language which runs in the browser to accomplish this.

You seem to be burdened with an excessive number of misconceptions.
Perhaps you should try JavaScript.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top