Drafts system implemented
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
function init(options) {
|
||||
const opts = options || {};
|
||||
const pending = opts.pending || [];
|
||||
const draftUuid = opts.draftUuid || '';
|
||||
const csrf = getCookie('csrftoken');
|
||||
const csrfHeader = csrf ? { 'X-CSRFToken': csrf } : {};
|
||||
|
||||
@@ -112,6 +113,7 @@
|
||||
const fd = new FormData();
|
||||
fd.append('file', file);
|
||||
fd.append('kind', z.kind);
|
||||
if (draftUuid) fd.append('draft_uuid', draftUuid);
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/api/uploads/');
|
||||
|
||||
Reference in New Issue
Block a user