X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Froot-helpers%2Fimages.ts;h=c4b09ec3cfcdd9b83e97f406ecdf8d03a0ac784f;hb=44ba8aaa4b9a89624502debdb353ed8ec64a4dc5;hp=fb229ce6dab2f6b1e91efc52fa9594f32d1348fa;hpb=0ea2f79d45b301fcd660efc894469a99b2239bf6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/root-helpers/images.ts b/client/src/root-helpers/images.ts index fb229ce6d..c4b09ec3c 100644 --- a/client/src/root-helpers/images.ts +++ b/client/src/root-helpers/images.ts @@ -1,8 +1,10 @@ +import { logger } from './logger' + function imageToDataURL (input: File | Blob) { return new Promise(res => { const reader = new FileReader() - reader.onerror = err => console.error('Cannot read input file.', err) + reader.onerror = err => logger.error('Cannot read input file.', err) reader.onloadend = () => res(reader.result as string) reader.readAsDataURL(input) })