508 compliant file upload in IE? - html

I'm tasked with creating a 508 compliant form that includes a file upload function. It works just fine in any browser except for IE, but we need to support IE as well.
The problem is that the "Browse..." button on the file upload element won't open the file upload dialogue with the enter key. Instead, the enter key attempts to submit the form. The space key, however, opens the file upload dialogue just fine.
The code is super basic- a vanilla file upload element:
<form name="submitForm" action=....>
<fieldset>
<%---other stuff here---%>
<input type="file" name="..." id="..." tabindex="12"/>
</fieldset>
</form>

Related

not allowed to load local resource in Google Chrome

Google Chrome won't allow me to open a local directory with a button. I tried
the same thing with IE and it works perfectly, is there a workaround for this?
when I look at the dev tooks console, it prints:
Not allowed to load local resource:
here's the simple html that I'm using:
<form action="file://///directory/test/CB/">
<input type="submit" value="open folder" />
</form>

How to allow PDF file uploads on iOS?

The Problem
I've built an HTML web form for the purpose of uploading files. When accessed from an iOS device, non-image files (.pdf, .docx, etc.) appear greyed-out when the "Browse" button is chosen to select a file from the iOS file explorer.
I have a fully-featured page (HTML, CSS, JS, PHP), but I've stripped the whole page down to the simplest form element to test functionality. Here's an example of code that does not work on my server (this is all that's in the HTML file besides the boilerplate tags), when viewed on a device running iOS 12.3:
<form action="" enctype="multipart/form-data" method="post">
<input type="file" accept="image/*, .heic, .hevc, .heif, .pdf, .png, .gif, .jpg, .jpeg, .doc, .docx, image/png, image/jpg, image/jpeg, image/gif, application/msword, application/pdf" multiple>
</form>
You can see a similarly simple working example of non-image files being selectable from an iOS device with one of the W3School's "Try It" editors:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_file
What I've Tried
SSL (extended validation)
Apple technical support (referred to Apple Developer website after a couple hours on the phone)
Multiple browsers (iOS Safari, iOS Chrome, iOS Google App)
Multiple Apple devices (works on Mac, fails on iPhone and iPad)
Competitive platforms (works on Android)
iOS 13 beta (works)
The Question
Something is causing W3School's and other sites' servers to behave differently than mine when working with forms on iOS.
What is the factor on iOS that determines which sites/forms are able to select non-image files for an upload?
You must remove image/* and the other image/ file types.
<form action="" enctype="multipart/form-data" method="post">
<input type="file" accept=".heic, .hevc, .heif, .pdf, .png, .gif, .jpg, .jpeg, .doc, .docx, application/msword, application/pdf" multiple>
</form>
Here is a sample of your code with my corrections:
https://codepen.io/VladimirButakov/pen/XvXxGq?&editable=true
I made a web page that can get pdf files and send them to chats over a telegram bot.
I opened the web page from my Iphone and just selected a pdf and sended it and it worked just fine.
The code I used for the input file is the following.
<form action="inviapdf.php" enctype="multipart/form-data" method="post" class="inputfile">
<input accept=".png, .jpg, .jpeg" class="bott" type="file" name="pdf"/>
<button>SendPDF</button>
</form>
I have an Iphone 7+ with latest IOS release.
If I didn't answer your question can you be a bit more specific about it?
thanks

How to open camera app directly on web app using input tag and capture attribute?

I am working on image / pdf upload from a web page on Android phone (in webview) -
1. On button1 click, I want to open camera directly when clicking a button, currently it shows image chooser with files, camera, complete action options.
2. On button2 click, need to open only Files options(accepting pdf and images) and not camera.
For Q1 - I have tried capture="camera", capture="capture", capture="user", capture="environment" but all of them opens images chooser with all options.
For Q2 - I have tried accept=".pdf,.jpg,.jpeg,.gif" , accept="application/pdf,image/jpg,image/jpeg,image/gif"
This is my html code:
<input type="file" id="uploadFile" accept=".pdf,.jpg,.jpeg,.gif" style="display:none;"/>
<input type="file" id="capture" accept="image/*" capture="capture" style="display:none;">
note:
<input type="file" id="capture" accept="image/*" capture="capture" style="display:none;">
This triggers direct camera app on iOS app. but android shows all file upload options.
it shows below error when using capture="user"

input tag with accepts

I have a file to upload in my page.
<input type="file" id='fFile' name="template"/>
But I want it to show only rptdesign file. Could anyone please help?
Also I have added
<input type="file" id='fXls' name="template"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
for xlsx but when the dialog box appears with All files and Xlsx in the dropdown but all All Files selected. Can Xlsx be selected?
Look into MIME_Types:
<input accept="audio/*|video/*|image/*|MIME_type">
A list of different media MIME-types here!
Note: The accept attribute of the input tag is not supported in Internet Explorer 9 and earlier versions.
EDIT
In your Tomcat configuration files, go to your web.xml.
If you scroll down you will find mime-type mapping. Here you can specify extensions for the server!
Example (web.xml):
<mime-mapping>
<extension>asx</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>
Hopefully that helps!
In chrome its working fine and I found out that firefox are still working on it.
https://bugzilla.mozilla.org/show_bug.cgi?id=826185

HTML input type=file multiple - When publish app to IIS, only one file can be selected at a time

I have a basic form using <input type="file" multiple> to upload multiple files. It works fine when I'm developing (IIS Express) but when I publish the site to IIS, the multi-select only allows one file to be selected at a time. This behavior is consistent across all browsers and the page source at the browser is identical.
Is there a setting on IIS that could be causing this?
Here is the form code:
<form action="/Home/SubmitFiles" enctype="multipart/form-data" method="post" role="form">
<div class="form-group">
<label>Select one or more documents to convert:</label>
<input name="files" id="files" type="file" multiple>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default">Convert</button>
</div>
</form>
I have exactly the same problem. multiple is a html5 feature for input. After testing in IE10 with "IE7-Emulate" turned on, I've found an interesting thing: I turned proxy server off and multiple selecting suddenly start working with all browsers. First think was: "my proxy rewrites headers". I tried to modify popup page by adding . Multiselection started to work in IE10. There is no support for multiselection in IE7,8,9. If you want to use this versions of IE, you should try Flash or custom ActiveX controls.