[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Form-based file upload in Lynx ?
From: |
Foteos Macrides |
Subject: |
Re: LYNX-DEV Form-based file upload in Lynx ? |
Date: |
Fri, 17 Jan 1997 10:15:04 -0500 (EST) |
Bae Young Hyun <address@hidden> wrote:
>[...]
>I downloaded the latest version of Lynx, lynx2-6fm.zip.
>The 'CHANGE' file says that handling of forms with
>ENCTYPE="multipart/form-data" is added. But, even the latest version
>still doesn't support INPUTs with TYPE=="file" or TYPE="range".
>The exact function I need must include 'file' TYPE.
>
>I'm sorry that I don't have enough time to implement that file
>upload function. So, would you tell me the source structure of lynx
>roughly ? Which files or procedures are related to the processing
>of FORM, especially that with ENCTYPE="multipart/form-data".
>If I add a program module or fixed the existing sources to support
>INPUTs with TYPE=="file", what shell I do ? Would you point out the
>uncompleted part in the sources ?
>
>What do I consider carefully to support 'file' TYPE ?
First you need to read and understand:
Linkname: RFC 1867
URL: http://www.ics.uci.edu/pub/ietf/html/rfc1867.txt
The 2.6FM code set has all of the elements and attributes associated
with FORMs and INPUT TYPE="file" in its DTD, as specified in the most
recent IETF RFC for HTML. The HTML version of that RFC is:
Linkname: RFC 2070 - HTML Internationalization
URL: http://www.alis.com:8085/ietf/html/rfc2070.html
The SGML parser invokes HTML_start_element in HTML.c for that, and
under "case HTML_INPUT:", you'll need to understand that code and
expand the section which is presently:
[..]
} else if (!strcasecomp(I.type, "file")) {
if (present[HTML_INPUT_ACCEPT])
I.accept = (char *)value[HTML_INPUT_ACCEPT];
/*
* Not yet implemented.
*/
if (me->inUnderline == FALSE) {
HText_appendCharacter(me->text,
LY_UNDERLINE_START_CHAR);
}
HTML_put_string(me,"[FILE Input] (Not yet implemented.)");
if (me->inUnderline == FALSE) {
HText_appendCharacter(me->text,
LY_UNDERLINE_END_CHAR);
}
HText_DisableCurrentForm();
if (TRACE)
fprintf(stderr, "HTML: Ignoring TYPE=\"file\"\n");
break;
}
}
[...]
The FORM structures are defined and handled in HTForms.h, LYForms.c
and GridText.c. I've set that all up for eventual implementation of
file uploads in conjunction with ENCTYPE=multipart/formdata handling, but
other enhancements are presently higher in my own todo list.
<BLOCKQUOTE>
This information provided,
free of charge,
in my spare time,
to do with as you see fit.
</BLOCKQUOTE>
Fote
=========================================================================
Foteos Macrides Worcester Foundation for Biomedical Research
address@hidden 222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;