@jackdbd/fastify-media-endpoint

Fastify plugin that adds a Micropub Media endpoint to a Fastify server.
Installation
npm install @jackdbd/fastify-media-endpoint
Fastify plugin media-endpoint options
Options for the Fastify media-endpoint plugin
Properties
ajv | | Instance of Ajv
| no |
deleteMedia (Delete post) | Function | Deletes a post published at a URL.
| yes |
includeErrorDescription | boolean | Whether to include an error_description property in all error responses. This is meant to assist the client developer in understanding the error. This is NOT meant to be shown to the end user. Default: false
| no |
isAccessTokenRevoked | Function | Predicate function that returns true if a jti (JSON Web Token ID) is revoked.
| yes |
logPrefix | string | Default: "[media-endpoint] "
| no |
me | | | yes |
multipartFormDataMaxFileSize (multipart/form-data max file size) | number | Max file size (in bytes) for multipart/form-data requests. Default: 10000000 Minimum: 0
| no |
reportAllAjvErrors (report all AJV errors) | boolean | Whether to report all AJV validation errors. Default: false
| no |
uploadMedia (Upload file) | Function | Uploads a file to the Micropub server.
| yes |
Example
{
"includeErrorDescription": false,
"logPrefix": "[media-endpoint] ",
"multipartFormDataMaxFileSize": 10000000,
"reportAllAjvErrors": false
}
Dependencies
[!WARNING]
This package defines 2 peer dependencies.
@fastify/request-context | >=6.0.0 |
fastify | >=5.0.0 |
References
License
© 2024 - 2025 Giacomo Debidda // MIT License