()
| 228 | |
| 229 | // Initialize drag-and-drop support |
| 230 | async function initDragDrop() { |
| 231 | try { |
| 232 | const { setupDragAndDrop, setupPasteSupport } = await import('./fileUploadHelpers.js') |
| 233 | |
| 234 | setupDragAndDrop({ |
| 235 | uploadArea: uploadArea, |
| 236 | onFilesDropped: handlePreviewFiles, |
| 237 | acceptType: 'image/gif' |
| 238 | }) |
| 239 | |
| 240 | setupPasteSupport({ |
| 241 | onFilesPasted: handlePreviewFiles, |
| 242 | acceptType: 'image/gif' |
| 243 | }) |
| 244 | |
| 245 | } catch (err) { |
| 246 | console.warn('Failed to load file upload helpers:', err) |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | // Handle preview files |
| 251 | function handlePreviewFiles(files) { |
no test coverage detected