Method: NFTStorage::NFTStorageAPI#store

Defined in:
lib/nft_storage/api/nft_storage_api.rb

#store(body, opts = {}) ⇒ UploadResponse

Store a file Store a file with nft.storage. - Submit a HTTP ‘POST` request passing the file data in the request body. - To store multiple files in a directory, submit a `multipart/form-data` HTTP `POST` request. Use the `Content-Disposition` header for each part to specify a filename.

Parameters:

  • body (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



222
223
224
225
# File 'lib/nft_storage/api/nft_storage_api.rb', line 222

def store(body, opts = {})
  data, _status_code, _headers = store_with_http_info(body, opts)
  data
end