pgquery Open the app

pgquery / S3 bucket browser

Chapter 13 · Storage

Browse an S3 bucket from a browser tab

Next to PostgreSQL, pgquery connects to one S3 bucket at a time and shows it as folders and files, with previews. This page lists what it does and, just as important, what it does not.

What you can do

  • Open folders (keys are grouped by /), filter the current folder and load more when it holds over 1,000 objects.
  • Preview images, video (it seeks), audio, PDF and text or source code. Fonts and archives show their details only. A large text file asks before it loads and is not previewed above 10 MB.
  • Download any object.
  • Upload files into the open folder, create a folder, and delete objects or whole folders. Deleting asks first and says how many objects it will remove.
  • See the bucket's object count and total size under Bucket Info.

Connect a bucket

Choose S3 in the new connection dialog and fill in five fields:

  • Endpoint URL. AWS S3: https://s3.<region>.amazonaws.com. Cloudflare R2: https://<account-id>.r2.cloudflarestorage.com. MinIO or MaxIO: the server's address, such as http://host:9000.
  • Access key and secret key. Use a key limited to this bucket: it is saved in your browser.
  • Bucket and region. The region defaults to us-east-1; AWS needs the bucket's real region and R2 uses auto.

Test connection checks that the bucket exists and that the key can reach it. Without a bucket at hand, open the read-only sample bucket.

What it does not do

  • One bucket per connection. It does not list, create or delete buckets.
  • Access keys only: no session tokens, no IAM roles. Requests use Signature V4 and path-style addressing, so the service has to accept path-style requests.
  • Uploads are one request per file, with no resume and no multipart upload. A self-hosted instance accepts files up to MAX_UPLOAD_MB, 100 by default; the hosted app has a limit of its own. Every file passes through the pgquery server on its way, so very large files belong in the AWS CLI or rclone.
  • A delete removes up to 10,000 objects at a time. Larger folders need the AWS CLI or a lifecycle rule.
  • No rename, copy or move. No editing of metadata or tags. No versioning, ACLs, bucket policies or lifecycle rules.
  • The filter only matches what is loaded in the open folder.
  • Bucket Info stops counting at 100,000 objects or after 20 seconds, and says so.

pgquery's tests run against an S3 emulator. AWS S3, R2 and MinIO speak the same protocol, but if a service behaves differently, please open an issue with the service name.

Where your keys and files go

Connections, keys included, are saved in your browser's localStorage. Every request carries them to the pgquery server, which talks to the bucket and returns the result. Previews and downloads use a link that expires after an hour, so the keys never appear in a URL. Files pass through the server without being kept; its code does not log keys or file contents.

The hosted app only reaches buckets on the public internet. For MinIO on localhost or storage inside a private network, run pgquery yourself next to it.

Questions

Which services does the S3 browser work with?

Services that speak the S3 API and accept path-style requests with Signature V4: AWS S3, Cloudflare R2, MinIO and similar. pgquery is tested against an S3 emulator, so report any service that misbehaves.

Can I upload large files?

Up to the server limit: 100 MB by default on a self-hosted instance, set with MAX_UPLOAD_MB. Uploads are a single request with no resume, so use the AWS CLI or rclone for anything bigger.

Are my S3 keys safe?

They stay in your browser and travel with each request to the pgquery server, which does not log or store them. Use a key limited to one bucket, and self-host if the keys must not leave your network.

Can it delete a folder?

Yes. S3 has no real folders, so pgquery deletes every object under the prefix, after showing how many that is. It refuses more than 10,000 objects at once.

More chapters