mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: register DOMPurify hooks once, abort featured upload, fix double drop
- Register DOMPurify hooks at module init (not per sanitizeHtml call) - Always set iframe allow attribute (not conditional on existing) - Add AbortController to featured image upload for unmount cleanup - Check defaultPrevented in React onDrop to prevent double upload with TipTap - Remove explicit Content-Type header on upload (axios auto-sets boundary)
This commit is contained in:
@@ -64,7 +64,7 @@ export const newsApi = {
|
||||
const response = await apiClient.post<NewsMediaUploadResponse>(
|
||||
'/cabinet/admin/news/media/upload',
|
||||
formData,
|
||||
{ headers: { 'Content-Type': 'multipart/form-data' }, signal },
|
||||
{ signal },
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user