fix: synthesize readable filename for rejected clipboard pastes
Rejected clipboard items now show as "pasted-item.tiff" instead of raw MIME subtype, so the upload panel entry is readable.
This commit is contained in:
@@ -299,9 +299,10 @@ export function setupPaste(
|
||||
|
||||
// Reject unsupported media types with feedback
|
||||
if (!ALLOWED_MIME_TYPES.has(item.type)) {
|
||||
const ext = extFromMime(item.type);
|
||||
uploads?.addRejected(
|
||||
item.type.split('/')[1] || 'unknown',
|
||||
`Unsupported format: ${extFromMime(item.type)}`,
|
||||
`pasted-item${ext.startsWith('.') ? ext : '.' + ext}`,
|
||||
`Unsupported format: ${ext}`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user