save zip with date in filename

This commit is contained in:
Rick Companje 2021-06-06 20:55:28 +02:00
parent 4a1e69b6f6
commit 71ea685880
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ export const downloadAllSketches = () => {
const dataBlob = await zip.generateAsync({ type: 'blob' }); const dataBlob = await zip.generateAsync({ type: 'blob' });
return dispatch({ return dispatch({
type: ALL_SKETCHES_EXPORT, type: ALL_SKETCHES_EXPORT,
payload: dispatch(saveAs(dataBlob, 'My Doodles.zip')) payload: dispatch(saveAs(dataBlob, 'Doodle3D-doodles-'+new Date().toISOString().split('T')[0]+'.zip'))
}).catch(error => { }).catch(error => {
dispatch(notification.error({ title: 'Saving doodle failed' })); dispatch(notification.error({ title: 'Saving doodle failed' }));
throw error; throw error;
@ -129,7 +129,7 @@ export const openFileSelector = () => {
} }
}; };
await dispatch(actions.files.saveDoodle(fileName, doc, null)); await dispatch(actions.files.saveDoodle(name, doc, null));
break; break;
} }
} }