Solved

Javascript limit upload mediatype

Posted on 2016-10-07
4
33 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
  • 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now