storage API

Update

Update a file resource under as specified by path.If path does not exists, it will be created.

await storageInterface.update("index/", new Blob(["test"]));// logs {path: "index/"}

Parameters

path
string - resource path. The base path is the current project path.
blob
Blob - The blob representation of the file. If not setted, a directory will be created.

Return Value

A Promise that to resolve to a JSON object structured as follows

path
string- The path affected by this method.

Description

This method modifies and creates files within a tilepiece project.
The decoding of the blob data is done according to the mime type associated with the file name extension