Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Javascript limit upload mediatype

Posted on 2016-10-07
4
Medium Priority
?
63 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
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 …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

963 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