3 ms·
The file comes from wherever you have it stored in the first place (FTP, S3, SFTP, virtually anything) and viewer are plugins implementing various interfaces wh
by mickael-kerjean 1y ago
The file comes from wherever you have it stored in the first place (FTP, S3, SFTP, virtually anything) and viewer are plugins implementing various interfaces which are packaged up onto a zip file. With this approach, to add support for psd, I just implemented the image viewer interface (https://github.com/mickael-kerjean/filestash/blob/a605988d5c0d50256ac28868a3c232ff3f37a9ab/public/assets/pages/viewerpage/application_image.js#L24-L26 https://github.com/mickael-kerjean/filestash/blob/a605988d5c...), to add support for parquet files I implemented the table viewer interface (https://github.com/mickael-kerjean/filestash/blob/a605988d5c0d50256ac28868a3c232ff3f37a9ab/public/assets/pages/viewerpage/application_table.js#L16-L20 https://github.com/mickael-kerjean/filestash/blob/a605988d5c...) and still have the freedom for custom stuff like this docx editor based of libre office wasm: https://github.com/mickael-kerjean/filestash/tree/master/server/plugin/plg_application_office https://github.com/mickael-kerjean/filestash/tree/master/ser... Most of the actual implementations of the base interfaces are done in C, compiled to wasm and running via a web worker