Users

Upload a user file

Uploads a file to the specified field for the user identified by the specified slug.

post/user/{user_slug}/upload/{field_slug}

Headers

Accept'application/vnd.Creative Force.v2.3+json' | 'application/vnd.Creative Force.v2.3+xml' required

Defines the response type.

Request body

filenamestring required

Original filename of the uploaded file, including the extension.

datastring byte required

Base64-encoded contents of the file.

The encoded payload must round-trip cleanly through standard base64 decoding; payloads with stray characters, incorrect padding, or other malformed encoding are rejected.

Example request

{
  "filename": "example.pdf",
  "data": "aGVsbG8gd29ybGQ="
}

Response

User file uploaded.

filenamestring

Original filename of the uploaded file, including the extension.

tokenstring

Opaque identifier for the stored file. Used as the {token} path parameter on /file/{token}.

linkstring uri

Canonical URL for retrieving the uploaded file.

Example response

{
  "filename": "example.pdf",
  "token": "AbCdEfGhIjKlMnOp",
  "link": "https://api.au.cr4ce.com/file/AbCdEfGhIjKlMnOp"
}

Changes

Changed in 3 of the 50 revisions of this API.17

    • api tag Users added

      api-tag-added

    • api tag User removed

      api-tag-removed

    • added the media type application/xml for the response with the status 201

      response-media-type-added

    • added the media type application/xml for the response with the status 400

      response-media-type-added

    • added the media type application/xml for the response with the status 401

      response-media-type-added

    • added the media type application/xml for the response with the status 403

      response-media-type-added

    • added the media type application/xml for the response with the status 404

      response-media-type-added

    • added the media type application/xml for the response with the status 422

      response-media-type-added

    • added the media type application/xml for the response with the status 429

      response-media-type-added

    • added the media type application/xml for the response with the status 503

      response-media-type-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 422

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the non-success response with the status 503

      response-non-success-status-added