Closed Bug 538761 Opened 15 years ago Closed 15 years ago

Cannot make an 'Open File' button

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 36619

People

(Reporter: codedread, Unassigned)

Details

I have a horizontal toolbar of 24x24 image buttons in my HTML web app.  I would like to make one of those buttons a standard "File Open" button.

With Mozilla's implementation of the File API https://developer.mozilla.org/en/Using_files_from_web_applications this seems like it should be possible but:

  * only an <input type="file"> can invoke the file chooser dialog and get a FileList object (I think)
  * you cannot really change the appearance of the file input control
  * you can try to do some hacks like http://www.quirksmode.org/dom/inputfile.html but there are problems with this approach:
    * the mouse cursor cannot be changed to 'pointer' when overtop the transparent file input
    * the transparent input's width cannot be restricted to 24x24 so it causes problems with cursor appearances for buttons to the right


As we move more into the realm of web apps, it seems like this will be a requirement.  It's super-simple to bring up a File Chooser dialog in lots of desktop app frameworks, it should be just as easy in an HTML web app.

I understood from IRC discussions that there were security implications involved, so please feel free to also clarify those here.  Presumably the user knows what they are doing when they see a File Chooser dialog to choose a file.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.