Remove staging banner, add resume file upload
This commit is contained in:
parent
c58b5c2250
commit
ce523e98e4
6 changed files with 21 additions and 34 deletions
|
|
@ -15,18 +15,17 @@ function getApiPath(formId) {
|
|||
}
|
||||
|
||||
async function submitForm(form, formId) {
|
||||
const formData = new FormData(form);
|
||||
const data = Object.fromEntries(formData.entries());
|
||||
|
||||
const submitBtn = form.querySelector('button[type="submit"]');
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.textContent = 'Submitting...';
|
||||
|
||||
try {
|
||||
// Use FormData (handles file uploads) - NOT JSON
|
||||
const formData = new FormData(form);
|
||||
|
||||
const response = await fetch(PROXY_URL + getApiPath(formId), {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data)
|
||||
body: formData
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue