Skip to content

Commit

Permalink
sign_s3_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Jun 11, 2024
1 parent fc471bb commit 0baa868
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ uploadButton.addEventListener("click", (event) => {
const path = "upload/"+fileInput.files[0].name;
// renderlo dinamico @toninospiderman123
const config = {
signerUrl: "https://api.tngrm.io/api/v3.0/external/upload/sign_s3_url",
signerUrl: "https://api-compress.hiway.media/api/v4.0/external/upload/sign_s3_url",
logging: true,
signHeaders: { tangram_key: apiKeyInput.value },
aws_url: ``,
Expand Down
20 changes: 2 additions & 18 deletions lib/compressjs/tangram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class TangramClient {
client_id: string;
//evaporate: Evaporate;
configEvaporate: any;
SIGNER_URL: string = `${TNGRM_BASE_URL}${SIGN_S3_URL}`
SIGNER_URL: string = `${TNGRM_BASE_URL}${SIGN_S3_URL}`; // need to test it with api_key
/**
*
* @param {string} apikey
Expand All @@ -31,24 +31,8 @@ export class TangramClient {
//
this.api_key = apikey;
this.customer_name = customer_name;
this.client_id = `${this.customer_name}_client`,
// understand if we need to saved globally all categories in constructor
this.configEvaporate = {
signerUrl: `${TNGRM_BASE_URL}${SIGN_S3_URL}`,
logging: true,
signHeaders: { tangram_key : `` },
aws_url: "",
aws_key: "",
bucket: "",
cloudfront: false,
progressIntervalMS: 1000, //interval every 1 sec update progress callback
sendCanonicalRequestToSignerUrl: true, // needed for minio s3
computeContentMd5: true,
//cryptoMd5Method: function (data) { return CryptoJS.md5(data, 'base64'); },
//cryptoHexEncodedHash256: function (data) { return CryptoJS.sha256(data, 'hex'); }
}
this.client_id = `${this.customer_name}_client`;
//this.evaporate = new Evaporate(this.configEvaporate);

}
//
/**
Expand Down

0 comments on commit 0baa868

Please sign in to comment.