Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imagekit-javascript",
"version": "3.0.0",
"version": "3.0.1",
"description": "Javascript SDK for using ImageKit.io in the browser",
"main": "dist/imagekit.cjs.js",
"module": "dist/imagekit.esm.js",
Expand Down
6 changes: 3 additions & 3 deletions src/constants/errorMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export default {
help: "",
},
INVALID_UPLOAD_OPTIONS: { message: "Invalid uploadOptions parameter", help: "" },
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, sginature and expire for authentication.", help: ""},
MISSING_SIGNATURE: { message: "Missing signature for upload. The SDK expects token, signature and expire for authentication.", help: ""},
MISSING_TOKEN: { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: ""},
MISSING_EXPIRE: { message: "Missing expire for upload. The SDK expects token, signature and expire for authentication.", help: ""},
INVALID_TRANSFORMATION: { message: "Invalid transformation parameter. Please include at least pre, post, or both.", help: ""},
INVALID_PRE_TRANSFORMATION: { message: "Invalid pre transformation parameter.", help: ""},
INVALID_POST_TRANSFORMATION: { message: "Invalid post transformation parameter.", help: ""},
Expand Down
6 changes: 3 additions & 3 deletions test/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing token for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing signature', function () {
Expand All @@ -149,7 +149,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing signature for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing signature for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing expire', function () {
Expand All @@ -165,7 +165,7 @@ describe("File upload", function () {
imagekit.upload(fileOptions, callback);
expect(server.requests.length).to.be.equal(1);
expect(callback.calledOnce).to.be.true;
sinon.assert.calledWith(callback, { message: "Missing expire for upload. The SDK expects token, sginature and expire for authentication.", help: "" }, null);
sinon.assert.calledWith(callback, { message: "Missing expire for upload. The SDK expects token, signature and expire for authentication.", help: "" }, null);
});

it('Missing public key', function () {
Expand Down