Nariman Jelveh c0717947d1 feat(gui): show thumbnails for uploaded iWork, OpenDocument, Sketch and EPUB files (#4685)
* refactor(gui): give the ZIP reader and the image-type check modules of their own

The reader of a ZIP archive's directory and entries moves from ooxml.js
to zip.js, and telling an image's type from its first bytes moves from
audio.js to images.js, so that readers of other packaged formats can use
both. The archive's read budget gets a name of its own, with the value
it had. What the existing readers do is unchanged.

* feat(gui): show the preview a packaged document carries as its thumbnail

Some formats are archives that hold a picture of the document, made by
the editor that saved it. On upload, the desktop takes that picture and
passes it to the image thumbnail generator:

- Pages, Numbers and Keynote keep preview.jpg and a smaller
  preview-web.jpg, and files from before 2013 QuickLook/Thumbnail.jpg.
- OpenDocument text, spreadsheets and presentations keep
  Thumbnails/thumbnail.png.
- Sketch keeps previews/preview.png.
- An EPUB's cover is found through its container and package document,
  by the EPUB 3 property, the EPUB 2 metadata entry, or its name.

Nothing is rendered, and the image's type comes from its own first
bytes. A file with none of these, such as a template or a text file
with the name a Keynote file has, keeps its file icon. These files share
the queue and the 5 second deadline of Office documents, and a stored
preview may be up to 8 MiB, which is published with the other limits.

In the Files tab's list rows, Pages, Numbers, Keynote and OpenDocument
files show their type icon, as other documents do. A Sketch preview and
a book's cover show in list rows too.

* fix(gui): scale one packaged document's picture at a time

The upload generator is called for every file at once, and the stored
preview was scaled outside the queue that read it, so a folder of books
decoded all their covers together. Each picture is now scaled inside the
queue, as audio covers are.

* fix(gui): skip a stored preview that states more than 16 megapixels

A packaged document's preview or an EPUB's cover went to the image
generator at whatever size it stated, and a picture is decoded at full
size before it is scaled. A preview over 16,777,216 pixels is now passed
over for the next one the file holds, as pictures in Office documents
and HEIC photos are.

pixelSizeOf() moves to images.js beside imageTypeOf() and reads WebP,
so a WebP preview keeps its thumbnail.

* fix(gui): find an EPUB cover whose path holds an XML entity

The paths an EPUB's container and package document give are XML
attribute values, so a cover at "Tom & Jerry.jpg" is the entry
"Tom & Jerry.jpg". The entities in them are now decoded before the
percent-encoding is.

* fix(gui): pass over a damaged preview entry for the next one a package holds

* fix(gui): try each cover an EPUB declares until one is a usable picture

* test(gui): import the ZIP fixture with the DOCX one it sits beside
2026-11-20 11:17:32 -07:00
…
2026-11-17 09:13:19 +07:00
…

Puter.com, The Personal Cloud Computer: All your files, apps, and games in one place accessible from anywhere at any time.

The Open-Source Internet Computer!

« LIVE DEMO »

Puter.com · App Store · AI Builder · Developers · X

screenshot


Puter

Puter is an advanced, open-source, self-hostable internet computer designed to be feature-rich, fast, and highly extensible.

For Users

Puter's goal is to provide you with every app and feature you need to work, create, and play under one roof. From a simple Notepad and Voice Recorder to Spreadsheet and Camera, Puter wants to be the all-in-one solution for your digital life.

For Developers

Puter provides everything you need to build and publish web apps and games. From AI to Cloud Storage and Database to Serverless Workers, Puter has you covered. Puter also helps you get users! Once you build your app, you can publish it on our App Store to reach and monetize users.


Getting Started

💻 Local Development

git clone https://github.com/HeyPuter/puter
cd puter
npm install
npm start

→ This should launch Puter at http://puter.localhost:4100

To run this checkout with Docker, follow Building from source. Create a local docker-compose.override.yml to select the local build; keeping these settings out of docker-compose.yml avoids conflicts when pulling updates and keeps local configuration out of pull requests.


🚀 Self-Hosting

Linux/macOS

curl -fsSL https://puter.com/selfhost | sh

Windows

irm https://puter.com/selfhost?os=windows | iex

→ For more details, see Self-Hosting Puter.


☁️ Puter.com

Puter is available as a hosted service at puter.com.


Support

Connect with the maintainers and community through these channels:

We are always happy to help you with any questions you may have. Don't hesitate to ask!


License

This repository, including all its contents, sub-projects, modules, and components, is licensed under AGPL-3.0 unless explicitly stated otherwise. Third-party libraries included in this repository may be subject to their own licenses.


Translations

Languages
TypeScript 62.3%
JavaScript 34.9%
CSS 1.6%
HTML 1.1%