POST
/
v1
/
store
/
file
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const file = await fetch("https://jigsawstack.com/preview/vocr-example.jpg");
const blob = await file.blob();

const response = await jigsaw.store.upload(blob, {
  key: "new-image.jpg",
  overwrite: true,
});
{
  "key": "new-image.jpg",
  "url": "https://api.jigsawstack.com/v1/store/file/read/new-image.jpg",
  "size": 75078
}
Maximum file size is 100MB.
x-api-key
string
required
Your JigsawStack API key
Content-Type
string
File content type e.g image/png, image/jpeg, video/mov, video/mp4

Body

blob
Blob
required
The blob file to upload.

Query

key
string
required
The key to store the file. We recommend you include the file extension in the key. E.g image-key.png
overwrite
boolean
default:"false"
Overwrite the file if key already exists.
temp_public_url
boolean
default:"false"
Provides a temporary public URL valid for 10 minutes, if set to true.
See complete guide on File Storage here

Response

success
boolean
Indicates whether the call was successful.
key
string
Key used in storing the file.
url
string
Url used in accessing the file.
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const file = await fetch("https://jigsawstack.com/preview/vocr-example.jpg");
const blob = await file.blob();

const response = await jigsaw.store.upload(blob, {
  key: "new-image.jpg",
  overwrite: true,
});
{
  "key": "new-image.jpg",
  "url": "https://api.jigsawstack.com/v1/store/file/read/new-image.jpg",
  "size": 75078
}