Remove duplicate IDs issue

This commit is contained in:
Martin Filser 2022-09-16 19:52:48 +02:00
parent cae4cc33f8
commit f6d7377977
2 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,5 @@
import { ObjectID } from 'bson';
const filesize = require('filesize');
const prettyMilliseconds = require('pretty-ms');
@ -46,7 +48,7 @@ Template.cardAttachmentsPopup.events({
if (files) {
let uploads = [];
for (const file of files) {
const fileId = Random.id();
const fileId = new ObjectID().toString();
const config = {
file: file,
fileId: fileId,
@ -130,7 +132,7 @@ Template.previewClipboardImagePopup.events({
if (pastedResults && pastedResults.file) {
const file = pastedResults.file;
window.oPasted = pastedResults;
const fileId = Random.id();
const fileId = new ObjectID().toString();
const config = {
file,
fileId: fileId,