Skip to content

Upload assets ​

Last updated View as Markdown

This helper function allows you to upload assets to the store.
It returns a promise that resolves to an object with the link and name of the uploaded asset. It's accepting a javascript File object only.

How to use ​

ts
const uploadResponse = await youcanjs.product.upload(file);

Returns ​

linkstring
namestring

Throws ​

ApplicationException if the request fails, or any other error occurs.