mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 23:12:33 -05:00
update routes
This commit is contained in:
1 parent
6a9b123cdc
commit
f637ee907c
6 files changed
+43
-6
No files matched your search
@@ -197,10 +197,20 @@ export default {
|
||||
formData.append('submitter_slug', this.submitterSlug)
|
||||
formData.append('name', 'attachments')
|
||||
|
||||
return fetch(this.baseUrl + '/api/attachments', {
|
||||
return fetch(this.baseUrl + `/s/${this.submitterSlug}/upload`, {
|
||||
method: 'POST',
|
||||
headers: { ...this.fetchOptions.headers },
|
||||
body: formData
|
||||
}).then((resp) => {
|
||||
if (resp.status === 404) {
|
||||
return fetch(this.baseUrl + '/api/attachments', {
|
||||
method: 'POST',
|
||||
headers: { ...this.fetchOptions.headers },
|
||||
body: formData
|
||||
})
|
||||
} else {
|
||||
return resp
|
||||
}
|
||||
}).then(async (resp) => {
|
||||
const data = await resp.json()
|
||||
|
||||
|
||||
Reference in new issue
Block a user