The parameters for the delete request.
The DeleteFileResponse, the response for the delete method.
Downloads a remotely stored file asynchronously to a location specified in
the params
object. This method only works on Node environment, to
download files in the browser, use a browser compliant method like an
tag.
The parameters for the download request.
Retrieves the file information from the service.
The parameters for the get request
The Promise that resolves to the types.File object requested.
Lists all current project files from the service.
The parameters for the list request
The paginated results of the list of files
Uploads a file asynchronously to the Gemini API. This method is not available in Vertex AI. Supported upload sources:
Optional parameters specified in the
types.UploadFileParameters
interface.
A promise that resolves to a types.File
object.
The mimeType
can be specified in the config
parameter. If omitted:
mimeType
will be inferred from the
file extension.mimeType
will be set to the Blob's type
property.
Somex eamples for file extension to mimeType mapping:
.txt -> text/plain
.json -> application/json
.jpg -> image/jpeg
.png -> image/png
.mp3 -> audio/mpeg
.mp4 -> video/mp4This section can contain multiple paragraphs and code examples.
types.UploadFileParameters#config for the optional config in the parameters.
Deletes a remotely stored file.