Storage

download

Downloads an audio file from the storage

moises.storage.download

Parameters

ParameterTypeDescription
urlstringThe URL of the audio file to download

Returns:

Promise<ArrayBuffer> - Promise that resolves with the downloaded audio data

Example resolved value:

// When the promise resolves, you get:
ArrayBuffer

Usage Example

import { initMoisesExtension } from '@moises.ai/extension'

const useMoisesExtension = initMoisesExtension({
  id: 'id',
  name: 'name',
  description: 'description',
  icon: 'icon',
  version: 'version',
  author: 'author'
})

const { moises } = useMoisesExtension()

const buffer = await moises.storage.download({ url: "https://storage.com/audio.mp3" })
console.log(buffer) // ArrayBuffer

This file is automatically generated. Do not edit manually.