dossiers: autosave shouldn't send files being uploaded
When a file is being uploaded asynchronosely, hidden input fields are created by DirectUpload to contain the result of the upload. However, before the upload finishes, the value of these inputs is not meaningful. Moreover, it makes the ActiveRecord signature invalid – thus preventing drafts from being saved. Exclude these fields from the auto-save.
This commit is contained in:
parent
64d96646a3
commit
c6eab70679
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ export default class AutosaveController {
|
|||
// exclude them from the draft (by disabling them).
|
||||
// (Also Safari has issue with FormData containing empty file inputs)
|
||||
const fileInputs = form.querySelectorAll(
|
||||
'input[type="file"]:not([disabled])'
|
||||
'input[type="file"]:not([disabled]), .editable-champ-piece_justificative input:not([disabled])'
|
||||
);
|
||||
fileInputs.forEach(fileInput => (fileInput.disabled = true));
|
||||
|
||||
|
|
Loading…
Reference in a new issue