Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am working with some code in SharePoint 2007 where a file upload control is built on a page with an HTML input element.

The original intent was to upload a single file. That worked fine. Now, I want to be able to upload multiple files. I added the multiple keyword like so:

<input name="upload" type="file" multiple />

But, I am still unable to select more than one file from the browse dialog.

I am using Internet Explorer 10, and this code works everywhere except on my page in SharePoint.

Why is this not working?

I was under the impression that it should be the browser which determines whether or not this will work, and not SharePoint or anything else within the browser. Am I wrong?

Could it be that the DOCTYPE definition in the SharePoint master page is not set to recognize HTML 5?

share|improve this question

migrated from stackoverflow.com May 23 '13 at 8:16

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You're right with multiple being introduced in HTML5. But as I've just read SharePoint 2007 seems to use XHTML. So you can probably getting it to work by changing the definition. In XHTML you have to use the multiple attribute like this:

<input type="file" multiple="multiple" />

Sources: SharePoint 2007 using XHTML: http://blog.mastykarz.nl/which-doctype-to-use-with-sharepoint-2007/ W3schools on input multiple: http://www.w3schools.com/tags/att_input_multiple.asp

share|improve this answer
    
Good sources. I tried changing the syntax to multiple="multiple" and that didn't work. I'll look into changing the DTD. –  SShaheen May 23 '13 at 13:00
    
thanks! Good luck with the DTD then. Keep me updated! –  peac3maker May 24 '13 at 9:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.