cypsela / sailplane-web

Collaborative p2p file sharing in the browser
https://cypsela.github.io/sailplane-web
GNU General Public License v3.0
77 stars 31 forks source link

improve img previews #1

Closed tabcat closed 3 years ago

tabcat commented 4 years ago

Currently image previews load ALL files in the current directory that match a set of image extensions into memory and then display the preview. This is obviously bad but was easy at the time. A good solution would look something like this:

When a file with an extension included in the image extensions is clicked to open a preview, the file data is fetched from ipfs. The solution should be ready for files that are not local, it should show a placeholder for the image and progress for the ipfs file fetch in the status component. The current directory images need to be loaded into memory only on preview but the data could be lazily fetched from ipfs and stored ahead of previewing.

anyone wants to take a stab at it, much appreciated. we will be fixing this eventually depending on time and money.

slavik0329 commented 3 years ago

fixed in: https://github.com/cypsela/sailplane-web/commit/4f3b11288cd7dcf3ae7c7b8e6a7cb63b4021a282