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:
@@ -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
|
||||
})
|
||||
};
|
||||
Reference in New Issue
Block a user