Write a file
PUT
Writes a file in the sandbox (text, or base64 for bytes), making its folders. Replaces a file already there. At most 10 MB.
apiKeyheader
AuthorizationBearer <hmk_…>An API key from the dashboard or homemade api-key create.
sandboxId*stringapplication/json- body
content*stringThe file's content, as text or base64 (see encoding).
encoding?stringDefault
"utf-8"Value in
"utf-8""base64"path*stringAbsolute, or relative to the sandbox's home directory.
Length
1 <= length <= 4096Written.
application/json- response
path*stringsize*integerRange
0 <= value <= 9007199254740991curl -X PUT 'https://api.homemade.dev/api/sandboxes/string/files' \ -H 'Content-Type: application/json' \ -d '{ "content": "string", "path": "string"}'Example Response
{ "path": "string", "size": 0}