feat: Allow all file types for upload and update UI text
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -372,8 +372,7 @@ if (btnPing) btnPing.onclick = async () => {
|
||||
dz.addEventListener('drop', (e)=>{
|
||||
e.preventDefault();
|
||||
const files = Array.from(e.dataTransfer.files || []);
|
||||
const accepted = files.filter(f => /^(image|video)\//.test(f.type) || /\.(jpe?g|png|heic|heif|webp|gif|tiff|bmp|mp4|mov|m4v|avi|mkv)$/i.test(f.name));
|
||||
accepted.forEach(addItem);
|
||||
files.forEach(addItem);
|
||||
render();
|
||||
runQueue();
|
||||
});
|
||||
@@ -409,11 +408,7 @@ fi.onchange = () => {
|
||||
suppressClicksUntil = Date.now() + 800;
|
||||
|
||||
const files = Array.from(fi.files || []);
|
||||
const accepted = files.filter(f =>
|
||||
/^(image|video)\//.test(f.type) ||
|
||||
/\.(jpe?g|png|heic|heif|webp|gif|tiff|bmp|mp4|mov|m4v|avi|mkv)$/i.test(f.name)
|
||||
);
|
||||
accepted.forEach(addItem);
|
||||
files.forEach(addItem);
|
||||
render();
|
||||
runQueue();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user