Closed
Bug 44065
Opened 26 years ago
Closed 22 years ago
rfc1867 style size attribute not correctly handled
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
WONTFIX
Future
People
(Reporter: bugzilla-replies, Assigned: rods)
References
Details
(Keywords: html4, relnote, Whiteboard: relnote-devel)
please read rfc1867, section 3.4 paragraph 2
mozilla seems to ignore the given height (at least i can't see how it lets me
choose more than one file)
Comment 1•26 years ago
|
||
Form-based File Upload in HTML
http://www.faqs.org/rfcs/rfc1867.html
HTML 4.01 Specification
http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1
------------------------------------------------------
The RFC you're referencing is an experimental protocol RFC.
The HTML4 specs define the use of 'size' for <input type="file" ...> as a number
of pixels for its width. [I wonder why it isn't treated like text/password and
used for number of characters instead?]
Those specs also seems to suggest one can only select one file per ``<input
type="file" ...>'':
17.2.1 Control types
file select
This control type allows the user to select files so that their contents
may be submitted with a form. The INPUT element is used to create a file
select control.
17.4.1 Control types created with INPUT
file
Creates a file select control. User agents may use the value of the value
attribute as the initial file name.
-----
Are you requesting an enhancement (the ability to select multiple files) based
on that RFC?
This RFC is labled as experimental, but it seems as it is a de facto standard.
On what spec/standard is mozillas handling of 'multipart/form-data' implemented?
(I use PHP to process the form data and PHP follows RFC1867.)
Currently (m16) mozilla interprets the size attribute as width (unit:
characters). If mozilla followed HTML4.1 than it should be interpretted as
pixels as you mentioned. I propose that mozilla scans the size attribute for
an ',' and than decides whether it should treat it as HTML4.1 or RFC1867 style.
This allows for specifying widthes in pixels (size=x) as in the HTML spec or in
characters (size=x,1). It then could allow to choose more than one file (if y>1
in size=x,y), and still be HTML4.1 compliant.
Comment 3•26 years ago
|
||
Since you say it's a de facto standard, could you attach a piece of HTML
displaying how it would be used, and point out which sites are currently using
it like that, and which browsers support it?
I've tried the following bit with both NS4.73 and IE5 and I only get one
textfield, 20 chars wide, and can only select one file:
<html>
<head><title>title</title></head>
<body>
<form><input type="file" size="20,4"></form>
</body>
</html>
You missunderstood me. Not how the size attribute is handled is a defacto
standard, but the RFC as a whole (with some exeptions like that). It would be
very nice to be HTML4.1 _and_ RFC1867 compliant in this issue. This is (at
least partially) possible, as I've stated before.
Comment 5•26 years ago
|
||
The HTML4 spec has incorporated most parts of that RFC:
RFC1867, 2. HTML forms with file submission:
| ...
| This proposal makes two changes to HTML:
|
| 1) Add a FILE option for the TYPE attribute of INPUT.
| 2) Allow an ACCEPT attribute for INPUT tag, which is a list of
| media types or type patterns allowed for the input.
|
| In addition, it defines a new MIME media type, multipart/form-data,
| and specifies the behavior of HTML user agents when interpreting a
| form with ENCTYPE="multipart/form-data" and/or <INPUT type="file">
| tags.
|
| These changes might be considered independently, but are all
| necessary for reasonable file upload.
| ...
(1), (2) and ENCTYPE="multipart/form-data" have been implemented by browsers and
are part of the HTML4 spec.
VALUE=<initial file name(s)> (mentioned elsewhere in the RFC) is also part of
the HTML4 spec but doesn't seem to be supported yet in Moz, nor is it in NS4 or
IE5. I've just filed an RFE for it: bug 44465.
The only part of RFC 1867 which wasn't incorporated is the SIZE="width,height"
part. How a file select control is rendered is up to the browser, so for some
cases SIZE="width,height" doesn't make sense, just like specifying a width in
number of characters doesn't always make sense.
I'd like to add to the above that using the SIZE attribute to indicate a number
of expected files is an ugly hack, SIZE should solely be used to indicate the
width of a control. If indicating an expected number of files is really needed,
adding another attribute is a cleaner way to do it, though browsers may not need
it to render a file select control correctly.
Note: the HTML 3.2 spec has the SIZE attribute in number of chars, and this is
also how Mozilla seems to interpret the SIZE attribute currently.
I do agree however that Mozilla needs to support uploading an arbitrary number
of files using just one file select control; I've filed bug 44464 for that and
I'll make this depend on it.
Personally, I think this is a WONTFIX, or an RFE at most, in need of a better
implementation than SIZE="width,height"
Depends on: 44464
| Assignee | ||
Comment 6•26 years ago
|
||
This bug has been marked "future" because the original netscape engineer working
on this is over-burdened. If you feel this is an error, that you or another
known resource will be working on this bug,or if it blocks your work in some way
-- please attach your concern to the bug for reconsideration.
Comment 8•26 years ago
|
||
Oh, yeah, that would be the dependency already marked, please ignore! :)
Updated•26 years ago
|
Whiteboard: relnote-devel
| Assignee | ||
Updated•24 years ago
|
Priority: P3 → --
Comment 12•22 years ago
|
||
In my opinion, this RFC has been superceded by the inclusion of most of it in
the HTML spec.
The SIZE attribute has a pretty clear definition in HTML (which it did not, for
this type of input, when the RFC was written), and that supercedes this RFC.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•