How are previews created?

Image and video previews are actually quite a bit hard to generate when using end to end encryption. First of all you need to know how files are uploaded to Filen: On the client side, your Filen client (browser, app, sync) chunks a file in seperate pieces (each exactly 1 MB). This way it's easier for us to store them and also more redundant + it's better for transfer speeds and reliability. When the file is uploaded (video or image in the case of previews), your client requests all the chunks from our cloud for images and only the first 4-16 chunks for a video. The client then decrypts those chunks, rebuilds the file and then generates a image/video using BLOBs. When said image is created, the client tries to compress it and then saves it to your localstorage (localForage). If you want you can take a look at our source code, which is available on Github (https://github.com/Dwynr/filen-app/blob/master/src/components/download.js#L780). The app, our File Manager and our sync client work the same way.

Article Details

Article ID:
9
Category:
Date added:
26.04.2021 22:08:50
Views:
57
Rating (Votes):
(1)

Related articles