Choose the representation that matches the data
The object upload action accepts text in `content` or encoded binary data in `contentBase64`. Text such as a Markdown note or JSON document can be passed directly as content. For a PDF, image, or other binary file, Base64 preserves the byte sequence when the API expects a string payload.
Base64 is an encoding, not encryption and not a compression format. Do not Base64-encode ordinary text unless the operation specifically requires that representation. If you pass a Base64 string as `content`, the stored object may contain the characters of the encoding rather than the original binary file.
Preserve type, path, and integrity
Choose an object key that reflects the file's purpose and set a suitable content type, such as `application/pdf` or `image/png`, when the client supports it. The content type labels how software should interpret the object; it does not convert the bytes. Keep the key and type consistent with the actual file.
After upload, check the returned key and size, then retrieve or open the object to confirm it is valid. Compare file size or a checksum when exact preservation matters. Avoid logging the full Base64 payload because it can be large and may expose the contents of a private file; keep diagnostics to the key, type, size, and sanitized error.