fix: align FilePond upload with the Node.js API and proxy gallery previews

Use the filepond-image field, parse the API envelope, and load private files through the authenticated content endpoint so uploads persist and images display.
This commit is contained in:
2026-08-15 18:46:26 +03:30
parent 67cba87661
commit 73670703bb
9 changed files with 263 additions and 57 deletions
+15
View File
@@ -0,0 +1,15 @@
// /src/api/filesApi.js
import axiosInstance from './axiosInstance';
export const filesApi = {
uploadTemp: (formData) => axiosInstance.post('/files/admin/upload-temp', formData, {
timeout: 120000
}),
getSignedUrl: (filename, bucket = 'temp') =>
axiosInstance.get(`/files/admin/signed-url/${encodeURIComponent(filename)}`, { params: { bucket } }),
getContent: (key, bucket) => axiosInstance.get('/files/admin/content', {
params: { key, bucket },
responseType: 'blob',
timeout: 120000
})
};