feat: add individual content types for formadata (#4550)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Akash K
2024-11-24 19:36:10 +05:30
committed by GitHub
parent b78cd57884
commit c74c42ebaf
10 changed files with 161 additions and 10 deletions

View File

@@ -72,13 +72,24 @@ const buildHarPostParams = (
<Har.Param>{
name: entry.key,
fileName: entry.key, // TODO: Blob doesn't contain file info, anyway to bring file name here ?
contentType: file.type,
contentType: entry.contentType ? entry.contentType : file?.type,
}
)
}
if (entry.contentType) {
return {
name: entry.key,
value: entry.value,
fileName: entry.key,
contentType: entry.contentType,
}
}
return {
name: entry.key,
value: entry.value,
contentType: entry.contentType,
}
})
}