buzz.bookhive.uploadPersonalBook

Upload an ebook file to the authenticated user's personal library. Accepts EPUB, MOBI/AZW/AZW3, FB2 (including .fb2.zip) and CBZ. The declared Content-Type is advisory only: the format is determined from the file's magic bytes checked against the `filename` extension, and a file that matches neither is rejected. `application/octet-stream` is accepted because mobile document pickers and plain curl uploads routinely send it.

Repository @bookhive.buzz did:plc:enu2j5xjlqsjaylv3du4myh4 namespace authority
Details · procedure
Kindprocedure
Authoritybookhive.buzz
Commit rev3n2mntpdbjk2e
Indexed

Procedure

procedure · POST

Parameters

query string

filename

requiredstring

Original file name including extension. Required: the extension is the only thing distinguishing the zip-container formats (.epub / .cbz / .fb2.zip) from each other, and it is the key used to match e-reader sync documents to this file.

  • minLength: 1
  • maxLength: 512

Input

application/epub+zip,application/x-mobipocket-ebook,application/vnd.amazon.ebook,application/vnd.amazon.mobi8-ebook,application/x-fictionbook+xml,application/vnd.comicbook+zip,application/x-cbz,application/zip,application/octet-stream

Output

application/json

storageQuotaBytes

requiredinteger

Total bytes this user is allowed to store

  • minimum: 0

storageUsedBytes

requiredinteger

Total bytes stored for this user after the upload

  • minimum: 0

Errors

UnsupportedFormat

The bytes are not a recognised ebook, or do not match the filename's extension

AlreadyExists

A book with this content hash is already in the library

TooLarge

The file exceeds the per-file size limit

QuotaExceeded

The upload would take the library over its total storage quota

Busy

Too many uploads are being processed; retry shortly