Brad,

It must have been Monday because I did indeed omit the HTML source from my
last message.  This time I've added it below.  Scott's API's allow for
downloading a file (although I haven't pursued getting it to work).  He
does have an example of posting data from a stream file but that doesn't
appear to me to be the same as a traditional file upload.

The web page I'm working with has an "upload file" button, a box for the
path/filename, a "browse" button, and a couple of other buttons to "set
ascii" and "change password".  Further down an outbound folder and a file
(a_124054.NO_ADD_REC) that I manually uploaded file are displayed.

I was hoping just to reference the IFS path/filename and click on the
upload button.  Am I looking at this from a too simplistic viewpoint?  I've
done automated FTP file uploads before where I've had to navigate to the
folder, specify binary transfer, then put the file.  I didn't think that
this appeared to be as involved as that.  Please correct me if I'm wrong.
Thanks.

Dave Parnin
Nishikawa Standard Company
Topeka, IN  46571
daparnin@xxxxxxxxxxxxxxxxxx


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Directory of /</TITLE>
</HEAD>
<BODY>
<CENTER><A HREF="/?logout" onMouseOver="window.status='Logout';return
true"><IMG SRC="/icons/stlogo.gif" BORDER=0 ALT="Logout"></A></CENTER>
<BR>
<TABLE BORDER=0 WIDTH=100%>
<TR><TD ALIGN=LEFT VALIGN=TOP>
<A HREF="/?T"><IMG SRC="/icons/dircurr.gif" BORDER=0> /</A>
</TD></TR>
</TABLE>
<HR>
<TABLE BORDER=0><TR>
<FORM ENCTYPE="multipart/form-data" ACTION="/" METHOD=POST>
<TD ALIGN=LEFT>
<INPUT TYPE=SUBMIT VALUE="Upload File">
</TD><TD ALIGN=LEFT>
<INPUT TYPE=FILE NAME="File" SIZE=20>
</TD>
</FORM>
<FORM METHOD="POST" ACTION="/" ENCTYPE="application/x-www-form-urlencoded">
<TD ALIGN=LEFT>
<INPUT TYPE="submit" VALUE="Set Ascii" NAME="switch"></TD><TD ALIGN=LEFT>
<INPUT TYPE="submit" VALUE="Chg Passwd",
NAME="switch">
</TD>
</FORM>
</TR></TABLE>
<HR>
<TABLE BORDER=0>
<TH><B>Name</B><TH><TH><B>Size [B]</B><TH><TH><B>Date</B>
<TR><TD NOWRAP ALIGN=LEFT><A HREF="a_124054.NO_ADD_REC"><IMG
SRC="/icons/default.gif" BORDER=0> a_124054.NO_ADD_REC</A></TD><TD></TD><TD
NOWRAP ALIGN=RIGHT>0</TD><TD></TD><TD NOWRAP ALIGN=RIGHT>26-Jul-2004 12:40
</TD><TD></TD><TD ALIGN=RIGHT><A HREF="a_124054.NO_ADD_REC?O"
onMouseOver="window.status='File options';return true"><IMG
SRC="/icons/options.gif" BORDER=0></A></TD></TR>
<TR><TD NOWRAP ALIGN=LEFT><A HREF="outbound/?T"><IMG SRC="/icons/dir.gif"
BORDER=0> outbound</A></TD><TD></TD><TD NOWRAP
ALIGN=RIGHT></TD><TD></TD><TD NOWRAP ALIGN=RIGHT>17-Jul-2004 00:02
</TD><TD></TD></TR>
</TABLE>
<BR>
</BODY>
</HTML>












                                                                                
                              
                      Brad Stone                                                
                              
                      <brad@xxxxxxxxxxx        To:       Web Enabling the AS400 
/ iSeries                     
                      m>                        <web400@xxxxxxxxxxxx>@SMTP@CTB  
                              
                      Sent by:                 cc:       (bcc: David A 
Parnin/Topeka/NISCO/SPCO)              
                      web400-bounces@mi        Subject:  Re: [WEB400] 501 -- 
Almost there...!  (plus a few    
                      drange.com                questions)                      
                              
                                                                                
                              
                                                                                
                              
                      08/02/2004 08:38                                          
                              
                      PM                                                        
                              
                      Please respond to                                         
                              
                      Web Enabling the                                          
                              
                      AS400 / iSeries                                           
                              
                      <web400@midrange.                                         
                              
                      com>                                                      
                              
                                                                                
                              
                                                                                
                              



Dave,

Each button should have a value.  You need to include the
value of the button when you do the POST or GET.  Clicking
the button is simply making the request to the program
specified on the form in the action value.

As far as fieldname=fieldvalue, you shouldn't have to tack
on a CRLF... you have to string all of those form values
together like:

field1=value1&field2=value2....  Not sure if Scott's APIs
handle that or not.

If you are uploading a file, that is a little more
involved.  Scott should be able to help and let you know if
his wrappers allow for that.  I know my GETURI tool handles
it.  And because it's so different than a normal post, it
makes things easier.  OTherwise you're looking up RFCs,
etc..  Hopefully Scott will reply (or someone that has used
his API wrappers for a file upload from a web form).

Uploading a file requires different processing than a
normal POST with a form.

The HTML source wasn't in your mail that I saw.  So, can
you answer the question.. does this web page simply allow
you to choose a file from your HD and upload it?  (I
suppose it has a coule extra values in the form as well as
the file name).

Brad
www.bvstools.com

On Mon, 2 Aug 2004 15:13:03 -0500
 daparnin@xxxxxxxxxxxxxxxxxx wrote:
>
>
>
>
> I've cleared the digital certificate and redirection
> cookie hurdles on
> trying to process a post to our bank's web page.  Now, I
> just need to fill
> in a box with a file name and "click" on a button (there
> are several).
> >From the examples I had seen I had the impression that
> if you looked at the
> HTML source of the page, found the fieldname in that
> source, you could say
> fieldname=filename and tack on a CRLF.  The HTML source
> is listed at the
> bottom.  The box for the file name appears to be "File".
>  The upload button
> that I want is immediately before the box.
>
> Question #1:  How do I "click" the correct button?
>
> The file name that I want to upload is in the IFS.  When
> doing this from a
> browser I specify a path/filename, click the button, and
> away it goes.  I
> was hoping that the same with the IFS from my RPG.
>
>
> Question #2:  How do I refer to this file name so that it
> can be uploaded
> when "the button is clicked"?
>
> When I tried assigning File=/IFSDIR/IFSFILE and posting
> it I got the
> following back:
>
> HTTP/1.1 501 Method Not Implemented
>
> Question #3:  What does this mean?
>
> Question #4:  Am I nuts?
>
> Thanks for any help and advice.
>
>
> Dave Parnin
> Nishikawa Standard Company
> Topeka, IN  46571
> daparnin@xxxxxxxxxxxxxxxxxx
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
>

Bradley V. Stone
BVS.Tools
www.bvstools.com
_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.