Local development
You can develop and test your integration without the production service: run the File Service locally, point your backend at it, and switch back by configuration. This guide is for backend developers who have access to the service’s repository. Nothing in your code changes between the two.
Run the service locally
Section titled “Run the service locally”The service’s repository has a setup guide that starts it on your machine in a development mode: an in-memory directory of tenants, applications and users instead of the Identity Server, development tokens you create from the command line, local storage instead of the real store, and processing that runs immediately. Follow that guide; it lists the fixture’s tenant, application, user and client ids.
The development mode cannot be switched on in staging or production: the service refuses to start with it.
Point your backend at it
Section titled “Point your backend at it”| Value | Production | Local |
|---|---|---|
| Files API URL | https://files.centralcodestation.com/api/v1 |
http://localhost:50600/api/v1 |
| Resource identifier | https://files.centralcodestation.com/api |
http://localhost:50600/api |
| Tokens | From the Identity Server | Development tokens printed by the service’s tooling, accepted only by a locally running service |
A service in development mode accepts development tokens only, not tokens of a real Identity Server. With curl or a generated client, send the development token as the bearer token. The Node client asks <issuerUrl>/oauth/token for its token: give it a fetch option that answers that one request with a development token ({ "access_token": "…", "expires_in": 3600 }) and passes every other request through.
What behaves the same, and what does not
Section titled “What behaves the same, and what does not”| Same as production | Different locally |
|---|---|
| Every route, body, answer and error code | Ticket URLs point at the local service instead of the store |
method: put and multipart, part sizes, ETags, completion |
Processing runs right after completion, in the same process |
| Permissions, visibility, share links, quotas, the audit log | No events reach the Notification Service |
| Images get their renditions | Video posters need the media tools installed on your machine |
So the same upload code (single PUT and multipart) runs against both. A web app on another local port can PUT to the local ticket URLs.