Files
gameno-dashboard/src/api/filesApi.js
T
kavehhn 73670703bb 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.
2026-08-15 18:46:26 +03:30

16 lines
520 B
JavaScript

// /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
})
};