Skip to content
Snippets Groups Projects
Commit 92ad1d45 authored by Martin's avatar Martin
Browse files

OZG-5977 use crypto for generating uuid

parent 5ea651c4
No related branches found
No related tags found
1 merge request!67OZG-5977 add multi option to file upload button
...@@ -39,8 +39,8 @@ import { ...@@ -39,8 +39,8 @@ import {
import { SnackBarService } from '@alfa-client/ui'; import { SnackBarService } from '@alfa-client/ui';
import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { faker } from '@faker-js/faker';
import { getUrl, Resource, ResourceUri } from '@ngxp/rest'; import { getUrl, Resource, ResourceUri } from '@ngxp/rest';
import { randomUUID } from 'crypto';
import { saveAs } from 'file-saver'; import { saveAs } from 'file-saver';
import { isNil } from 'lodash-es'; import { isNil } from 'lodash-es';
import { BehaviorSubject, forkJoin, Observable, of, throwError } from 'rxjs'; import { BehaviorSubject, forkJoin, Observable, of, throwError } from 'rxjs';
...@@ -89,7 +89,7 @@ export class BinaryFileService { ...@@ -89,7 +89,7 @@ export class BinaryFileService {
_buildUploadFile(toUploadFile: ToUploadFile): UploadFile { _buildUploadFile(toUploadFile: ToUploadFile): UploadFile {
return { return {
key: faker.string.uuid(), key: randomUUID(),
fileToUpload: toUploadFile.file, fileToUpload: toUploadFile.file,
uploadedFile: this._handleUpload(toUploadFile), uploadedFile: this._handleUpload(toUploadFile),
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment