Open Jos512 opened 7 years ago
When you see SKIP in the log it means that file has already exists in s3. you need to set onlyNew
as false if you want to reupload without checking it. onlyNew provides only shallow checking filename. And you are currently using this flag as false.
const error = (err) => {
gutil.log(`${chalk.red('[FAILED]')} ${fileMessage} :: ${chalk.red(err.message || err)}`);
};
const upload = () => {
uploadToS3(file, uploadPath, options, (err) => {
if (err) {
error(err);
} else {
gutil.log(`${chalk.green('[SUCCESS]')} ${fileMessage}`);
cache.remember(file);
}
taskDone(err, file);
});
};
As you see when this error is appeared cache shouldn't save it
Anyway.
MD5 file checking currently implemented in knox
library. this lib using in this package for uploading to S3.
And message "The Content-MD5 you specified did not match what we received." could specify to the bug in knox
package.
it is really intresting. I tried to reproduce it. but I got no results =(
Hi!
Using version 1.1.1, I consistently get the '400' error response when uploading. Looking at the AWS error responses, this happens when "The Content-MD5 you specified did not match what we received.".
For example:
Returns:
However, if I set
onlyNew
tofalse
, then the error message is not generated. But with that case, no file gets uploaded but all 'skipped over':So from my uninformed standpoint, there seems to be going something wrong with the MD5 checks.