Commit graph

4 commits

Author SHA1 Message Date
Pierre de La Morinerie
c6eab70679 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.
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
64d96646a3 javascript: autosave with explicit cookies settings
Older browsers implemented a different default value for `window.fetch`
credentials: it was omitted unless explicitely set.

So we force the value for these older browsers:

- Firefox 39-60
- Chrome 42-67
- Safari 10.1-11.1.2

See https://github.com/github/fetch#sending-cookies
2019-11-27 10:37:33 +00:00
Pierre de La Morinerie
6de5c0c9d1 autosave: make requests time out
This avoids recent requests being stuck because an older request never
finished.
2019-11-21 14:00:06 +01:00
Pierre de La Morinerie
bff7892ba8 dossiers: autosave drafts 2019-11-21 14:00:06 +01:00