Architecture

RRA File Upload is a standalone PHP application. WordPress supplies the user experience that embeds it, but authentication and file operations are handled by the file service.

ComponentResponsibility
WordPress integrationRequests an application token server-to-server and embeds the file-management pages. Its implementation is maintained outside the rra-files repository.
Apache and PHP applicationServes the upload, file-list, download, delete, and support pages. The container uses PHP 8.4 with Apache.
AuthenticationValidates signed JWTs and establishes browser session/CSRF state. Tokens are short-lived and IP-bound; page permissions determine allowed operations.
Amazon S3Stores uploaded file contents. The checked-in S3 clients use the ca-central-1 region.
Local metadataStores upload metadata and a consolidated file-list cache under forbidden_dir/. These files support listing and download lookup.

Request and upload flow

  1. WordPress requests a JWT from the application’s /API/0.1/get_jwt.php endpoint using the configured server-to-server authentication and the permissions for the browser user.
  2. The browser loads the embedded application and establishes CSRF/session state with the file service.
  3. The user submits files and optional notes. The application stages uploaded content, transfers it to S3, and records the associated local metadata.
  4. The file list reads the local cache. Download and delete operations use the file metadata and S3 object.

The exact WordPress integration is not present in the application repository. When changing authentication or embedding behavior, coordinate changes with that integration and validate the cross-site browser session.

Persistence

S3 objects and local metadata are both part of the application state. Preserve the persistent mount used for upload and metadata files when replacing a container. Rebuilding the local cache does not recreate missing file metadata or restore deleted S3 objects.

See the application README and deployment notes before changing storage.