fix: use api.upload() for artefact file attachments
All checks were successful
Deploy / deploy (push) Successful in 12s
All checks were successful
Deploy / deploy (push) Successful in 12s
api.post() was setting Content-Type to application/json and JSON.stringifying the FormData, which destroyed the file data and caused "Either file upload or drive_url is required" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -710,7 +710,7 @@ function ArtefactDetailPanel({ artefact, onClose, onUpdate, onDelete, projects =
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
await api.post(`/artefacts/${artefact.Id}/versions/${selectedVersion.Id}/attachments`, formData)
|
||||
await api.upload(`/artefacts/${artefact.Id}/versions/${selectedVersion.Id}/attachments`, formData)
|
||||
toast.success('File uploaded')
|
||||
loadVersionData(selectedVersion.Id)
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user