mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-11-24 00:48:03 +01:00
Restrict file picker extensions
This commit is contained in:
parent
089654dab1
commit
44de537459
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form class="w3-margin w3-center w3-card w3-padding-24" action="/upload" method="POST" enctype="multipart/form-data">
|
<form class="w3-margin w3-center w3-card w3-padding-24" action="/upload" method="POST" enctype="multipart/form-data">
|
||||||
<input type="file" accept="audio/*" name="file">
|
<input type="file" accept=".mp3,.wav" name="file">
|
||||||
<input type="submit" class="w3-button w3-blue">
|
<input type="submit" class="w3-button w3-blue">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ byte currentVolume = 12;
|
||||||
|
|
||||||
bool fileIsValid(String fileName)
|
bool fileIsValid(String fileName)
|
||||||
{
|
{
|
||||||
return !fileName.startsWith(".") && (fileName.endsWith(".mp3") || fileName.endsWith(".aac") || fileName.endsWith(".wav"));
|
return !fileName.startsWith(".") && (fileName.endsWith(".mp3") || fileName.endsWith(".wav"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearMessageArea()
|
void clearMessageArea()
|
||||||
|
|
Loading…
Reference in a new issue