Create a File
post
/storage/v1/Files
Request
Supported Media Types
- multipart/form-data
Root Schema : schema
Type:
Show Source
object
-
contentType:
string
HTTP content type of the uploaded file.
-
deleteAfter(optional):
integer
Amount of seconds after which the file will be deleted.
-
file:
string
Binary file content.
-
fileName:
string
Name of the file to create. May include path.Example:
filepath/file1.txt
-
filePartName(optional):
string
Name of the file part. Used when the file is in multiple parts.
-
isMultiPartFile(optional):
boolean
Indicates that the file will be made of a collection of files with the same filename, but with different file part names.
-
isPublic(optional):
boolean
Indicates whether the file will be private or public. Only private files are supported currently.Example:
true
Response
Supported Media Types
- application/json
201 Response
File creation status details.
Example Response (application/json)
{
"fileName":"files/filepath/file1.txt",
"isPublic":true,
"fileUrl":"https://storage.example.com/v1/Storage-ocistest/B027/files/filepath/file1.txt"
}