we use node.js and S3.
I have the following code to check if a file is exists:
var s3 = new AWS.S3();
S3.prototype.search = function (baseDirectory, url, size, callBack) {
console.log("we are in the correct function");
s3.headObject({"Key" : url.substring(1, url.length), "Bucket" : S3_BUCKET}, function (err, data) {
console.log("Callback is done");
})}
Everything works O.K, but in some point I notice that the callback is not return. Meaning, I get only:
console.log("we are in the correct function");
But "Callback is done"
isn't printed.
What can be the reason for this?
Aucun commentaire:
Enregistrer un commentaire