Solved

Javascript limit upload mediatype

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

831 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