- Docs
- Api%2Freference%2Fstorage%2FCreateAsset
Upload an asset to the storage service
Upload a new asset to the storage service. This endpoint accepts multipart form data containing the file to be uploaded along with metadata such as name, type, and folder location. The uploaded asset will be processed and made available for download.
AuthorizationBearer <token>
In: header
Request Body
multipart/form-data
Upload details
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api-testnet.dual.network/assets" \ -F provider="ipfs" \ -F folder="avatars" \ -F key="string" \ -F file="string"{
"id": "string",
"wallet_id": "string",
"name": "string",
"tag": "string",
"url": "string",
"path": "string",
"size": 0,
"provider": "ipfs",
"folder": "avatars",
"is_public": true,
"type": "string",
"hash": "string",
"when_created": "2019-08-24T14:15:22Z"
}{
"code": 0,
"message": "string",
"details": {}
}{
"code": 0,
"message": "string",
"details": {}
}{
"code": 0,
"message": "string",
"details": {}
}