| 354 | const uploadUrl = form.getAttribute('action') || withBasePath('/api/folder/uploadToSharedFolder.php'); |
| 355 | |
| 356 | function prependRow(parent, child) { |
| 357 | if (!parent || !child) return; |
| 358 | if (typeof parent.prepend === 'function') { |
| 359 | parent.prepend(child); |
| 360 | return; |
| 361 | } |
| 362 | if (parent.firstChild) { |
| 363 | parent.insertBefore(child, parent.firstChild); |
| 364 | } else { |
| 365 | parent.appendChild(child); |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | function isFileLike(file) { |
| 370 | return !!file && typeof file === 'object' && typeof file.name === 'string'; |