แก้ไขบัค file ในฟอร์มการลา
This commit is contained in:
parent
1022bfa6ab
commit
20c54462ea
11 changed files with 11 additions and 11 deletions
|
|
@ -143,7 +143,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataBirth.leaveDocument.length > 0) {
|
if (formDataBirth.leaveDocument.length > 0) {
|
||||||
const blob = formDataBirth.leaveDocument[0].slice(0, formDataBirth.leaveDocument[0].size)
|
const blob = formDataBirth.leaveDocument.slice(0, formDataBirth.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataBirth.leaveDocument[0].type,
|
type: formDataBirth.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataHelpWife.leaveDocument.length > 0) {
|
if (formDataHelpWife.leaveDocument.length > 0) {
|
||||||
const blob = formDataHelpWife.leaveDocument[0].slice(0, formDataHelpWife.leaveDocument[0].size)
|
const blob = formDataHelpWife.leaveDocument.slice(0, formDataHelpWife.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataHelpWife.leaveDocument[0].type,
|
type: formDataHelpWife.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataVacation.leaveDocument.length > 0) {
|
if (formDataVacation.leaveDocument.length > 0) {
|
||||||
const blob = formDataVacation.leaveDocument[0].slice(0, formDataVacation.leaveDocument[0].size)
|
const blob = formDataVacation.leaveDocument.slice(0, formDataVacation.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataVacation.leaveDocument[0].type,
|
type: formDataVacation.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataOrdination.leaveDocument.length > 0) {
|
if (formDataOrdination.leaveDocument.length > 0) {
|
||||||
const blob = formDataOrdination.leaveDocument[0].slice(0, formDataOrdination.leaveDocument[0].size)
|
const blob = formDataOrdination.leaveDocument.slice(0, formDataOrdination.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataOrdination.leaveDocument[0].type,
|
type: formDataOrdination.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataHaji.leaveDocument.length > 0) {
|
if (formDataHaji.leaveDocument.length > 0) {
|
||||||
const blob = formDataHaji.leaveDocument[0].slice(0, formDataHaji.leaveDocument[0].size)
|
const blob = formDataHaji.leaveDocument.slice(0, formDataHaji.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataHaji.leaveDocument[0].type,
|
type: formDataHaji.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataMilitary.leaveDocument.length > 0) {
|
if (formDataMilitary.leaveDocument.length > 0) {
|
||||||
const blob = formDataMilitary.leaveDocument[0].slice(0, formDataMilitary.leaveDocument[0].size)
|
const blob = formDataMilitary.leaveDocument.slice(0, formDataMilitary.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataMilitary.leaveDocument[0].type,
|
type: formDataMilitary.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataStudy.leaveDocument.length > 0) {
|
if (formDataStudy.leaveDocument.length > 0) {
|
||||||
const blob = formDataStudy.leaveDocument[0].slice(0, formDataStudy.leaveDocument[0].size)
|
const blob = formDataStudy.leaveDocument.slice(0, formDataStudy.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataStudy.leaveDocument[0].type,
|
type: formDataStudy.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataTrain.leaveDocument.length > 0) {
|
if (formDataTrain.leaveDocument.length > 0) {
|
||||||
const blob = formDataTrain.leaveDocument[0].slice(0, formDataTrain.leaveDocument[0].size)
|
const blob = formDataTrain.leaveDocument.slice(0, formDataTrain.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataTrain.leaveDocument[0].type,
|
type: formDataTrain.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
//
|
//
|
||||||
if (formDataWorkInternational.leaveDocument.length > 0) {
|
if (formDataWorkInternational.leaveDocument.length > 0) {
|
||||||
const blob = formDataWorkInternational.leaveDocument[0].slice(0, formDataWorkInternational.leaveDocument[0].size)
|
const blob = formDataWorkInternational.leaveDocument.slice(0, formDataWorkInternational.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataWorkInternational.leaveDocument[0].type,
|
type: formDataWorkInternational.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ async function FetchCheck() {
|
||||||
async function saveFormData() {
|
async function saveFormData() {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (formDataFollowSpouse.leaveDocument.length > 0) {
|
if (formDataFollowSpouse.leaveDocument.length > 0) {
|
||||||
const blob = formDataFollowSpouse.leaveDocument[0].slice(0, formDataFollowSpouse.leaveDocument[0].size)
|
const blob = formDataFollowSpouse.leaveDocument.slice(0, formDataFollowSpouse.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataFollowSpouse.leaveDocument[0].type,
|
type: formDataFollowSpouse.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ async function saveFormData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (formDataRehabilitation.leaveDocument.length > 0) {
|
if (formDataRehabilitation.leaveDocument.length > 0) {
|
||||||
const blob = formDataRehabilitation.leaveDocument[0].slice(0, formDataRehabilitation.leaveDocument[0].size)
|
const blob = formDataRehabilitation.leaveDocument.slice(0, formDataRehabilitation.leaveDocument[0].size)
|
||||||
const newFile = new File(blob, nameFile.value, {
|
const newFile = new File(blob, nameFile.value, {
|
||||||
type: formDataRehabilitation.leaveDocument[0].type,
|
type: formDataRehabilitation.leaveDocument[0].type,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue