GIF hinzugefügt, muss getestet werden
This commit is contained in:
parent
24c9f12695
commit
152772e3ad
@ -41,7 +41,7 @@ dropzone.addEventListener('drop', function(e) {
|
||||
this.classList.add('inactive');
|
||||
|
||||
file = e.dataTransfer.files[0];
|
||||
if( file.type == 'image/png' || file.type == 'image/jpeg' ) {
|
||||
if( file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
|
||||
upload(e.dataTransfer.files[0]);
|
||||
}
|
||||
});
|
||||
|
@ -14,7 +14,7 @@ if(isset($_FILES['upload'])) {
|
||||
$extension = pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION);
|
||||
$extension = strtolower($extension);
|
||||
|
||||
if($extension == 'jpg' || $extension == 'jpeg' || $extension == 'png') {
|
||||
if($extension == 'jpg' || $extension == 'jpeg' || $extension == 'png' || $extension == 'gif') {
|
||||
$filename = generate_filename($length) . '.' . $extension;
|
||||
move_uploaded_file($_FILES['upload']['tmp_name'], $datadir . '/' . $filename);
|
||||
echo json_encode(['datadir' => $datadir, 'filename' => $filename]);
|
||||
|
Loading…
Reference in New Issue
Block a user