Bug 32474
| Summary: | Selecting an application bundle (.app) shows the file size as 102 bytes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alfonso MartÃnez de Lizarrondo <amla70> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.6 | ||
| URL: | http://alfonsoml.blogspot.com/2009/12/uploading-app-files.html | ||
Alfonso MartÃnez de Lizarrondo
Create a simple upload form with an event handler to get the file size of the selected file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Upload test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function fileChanged(e)
{
var input = document.getElementById("upload");
console.log("Selected file: " + input.value);
console.log("File size: " + input.files[0].fileSize);
//console.log(input.files[0]);
//input.form.submit();
}
</script>
</head>
<body>
<form name="f1" method="POST" enctype="multipart/form-data">
<input type="file" name="upload" id="upload" onchange="fileChanged(event)">
<input type="submit">
</form>
</body>
</html>
Now select an application (.app bundle) in the file picker.
Safari 4.0.4 and the beta Chrome in Mac OS X 10.6.2 shows the size of the "file" as 102 bytes instead of the real size of the contents of that bundle.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I got 136 bytes for Adium, which is obviously incorrect.