[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Posting to a page with JavaScript



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Hi Dave,

Content-Disposition: form-data; name="File"; filename="/ACH/ACHNISCO.TXT"

I debugged the program and after the file was created and closed I edited
it to be:

Content-Disposition: form-data; name="File"; filename="ACHNISCO.TXT"

When HTTPAPI (or any other program that uses teh IFS interface) receives a filename that does NOT start with a slash "/" charater, it'll look for that filename starting in your current working directory.


(You can think of your current directory as being similar to your current library (*CURLIB), except that it's for IFS files rahter than traditional ones.)

Therefore, if you want it to list "ACHNISCO.TXT" without the /ACH at the start, you can change your current directory to /ACH, and then pass only "ACHNISCO.TXT" to the encoder routine.

To do that, you'll want to use the chdir() API (chdir = change director). It's prototyped for you in the IFSIO_H member of HTTPAPI. So you can code:

    /copy HTTPAPI_H
    /copy IFSIO_H
     .
     .
 other stuff goes here,including creating the MFD encoder
     .
     .
     chdir('/ACH');
     http_mfd_encoder_addstmf(enc: 'File': 'ACHNISCO.TXT': 'text/plain');
     .
     .

Does that make sense?

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------