Solved

Javascript limit upload mediatype

Posted on 2016-10-07
4
54 Views
Last Modified: 2016-11-12
I'm looking for the JavaScript code to limit the upload mediatype when running on an Android, so that video/mic etc is not shown as possible upload types ?

We're using

acceptFileTypes: /(.|\/)(gif|jpe?g|png|bmp|ico)$/i

but are still getting viceo/mic options on the upload screen
2016-10-07-09.27.27.png
0
Comment
Question by:Bojerne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 41876489
why do you want to stop the user to pick a photo from its camera ?
I don't see the mic on your screen capture.
0
 
LVL 1

Accepted Solution

by:
Bojerne earned 0 total points
ID: 41876639
Hi Leakim971,

Sorry, it was the wrong Picture I have uploaded - it looked like this (see attached). But we have fixed it now - I think the code, that we ended up using was something like this:

accept="video/;capture=camcorder" accept="audio/;capture=microphone"
2016-10-03_09-17-31.jpg
0
 
LVL 82

Expert Comment

by:leakim971
ID: 41876950
ok so if everything is alright, please close your question, thanks.
you can accept your own comment as solution
0
 
LVL 1

Author Closing Comment

by:Bojerne
ID: 41884534
Found a solution - no alternatives suggested
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question