StoreFile
This is the interface for uploading files to the gateway.
// StoreFile stores files to the gateway
//
// Receive parameter:
// - url: gateway url
// - file: stored file
// - territory: territory name
// - mnemonic: polkadot account mnemonic
//
// Return parameter:
// - string: [fid] unique identifier for the file.
// - error: error message.
//
// Preconditions:
// 1. Account requires purchasing space, refer to [BuySpace] interface.
// 2. Authorize the space usage rights of the account to the gateway account,
// refer to the [AuthorizeSpace] interface.
//
// Explanation:
// - Account refers to the account where you configured mnemonic when creating an SDK.
func StoreFile(url, file, territory, mnemonic string) (string, error)Example code:
Last updated
Was this helpful?

