Skip to main content

Uploading an image

You can upload a image or images provided you define a unique key for the visual regression they will be assigned to.


const image = // File
const hash = // Unique or exsting ID for visual regression

const formdata = new FormData()
formdata.set("file", image)
formdata.set("hash", hash)

axios
.post("/api/ui-regression/upload", formdata)
.then((response) => {})
.catch((error) => {});