Merge branch 'dev' into 'staging'
replice filename space to _ See merge request frontend/squzanswerer!167
This commit is contained in:
commit
f510672c40
@ -189,15 +189,18 @@ export function sendFile({ questionId, body, qid }: SendFileParams) {
|
||||
if (body.preview) return;
|
||||
const formData = new FormData();
|
||||
|
||||
const file = new File([body.file], body.file.name.replace(/\s/g, "_"));
|
||||
const nameImage = body.name.replace(/\s/g, "_");
|
||||
|
||||
const answers: Answer[] = [
|
||||
{
|
||||
question_id: questionId,
|
||||
content: "file:" + body.name,
|
||||
content: "file:" + nameImage,
|
||||
},
|
||||
];
|
||||
|
||||
formData.append("answers", JSON.stringify(answers));
|
||||
formData.append(body.name, body.file);
|
||||
formData.append(nameImage, file);
|
||||
formData.append("qid", qid);
|
||||
|
||||
return publicationMakeRequest({
|
||||
|
Loading…
Reference in New Issue
Block a user