We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm running v 4.0.1
copyObject is returning /tmp/buckets//<bucket_name>/key
Code: const copyObject = s3 => sourceBucket => outputBucket => ( oldKey, newKey) => {
const CopySource = `/${sourceBucket}/${oldKey}`; const params = { Bucket : outputBucket, CopySource, Key : newKey }; return s3.copyObject(params).promise();
test file:
const AWSMock = require('mock-aws-s3');
AWSMock.config.basePath = '/tmp/buckets';
const FAKE_S3 = AWSMock.S3({ params : { Bucket : KNOWN_OUTPUT_BUCKET } }), FAKE_OLD_KEY = 'oldkey', FAKE_NEW_KEY = 'newkey', FAKE_BODY = '123';
copyObject(FAKE_S3)(KNOWN_OUTPUT_BUCKET)(KNOWN_OUTPUT_BUCKET)(FAKE_OLD_KEY, FAKE_NEW_KEY) .then(res => { console.log('res',res)
Output:
res { Bucket: '/tmp/buckets/media-output-dev-use1-v1', CopySource: '/tmp/buckets//media-output-dev-use1-v1/oldkey', Key: 'newkey' }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm running v 4.0.1
copyObject is returning /tmp/buckets//<bucket_name>/key
Code:
const copyObject = s3 => sourceBucket => outputBucket => ( oldKey, newKey) => {
test file:
const AWSMock = require('mock-aws-s3');
AWSMock.config.basePath = '/tmp/buckets';
const FAKE_S3 = AWSMock.S3({
params : {
Bucket : KNOWN_OUTPUT_BUCKET
}
}),
FAKE_OLD_KEY = 'oldkey',
FAKE_NEW_KEY = 'newkey',
FAKE_BODY = '123';
copyObject(FAKE_S3)(KNOWN_OUTPUT_BUCKET)(KNOWN_OUTPUT_BUCKET)(FAKE_OLD_KEY, FAKE_NEW_KEY)
.then(res => {
console.log('res',res)
Output:
res {
Bucket: '/tmp/buckets/media-output-dev-use1-v1',
CopySource: '/tmp/buckets//media-output-dev-use1-v1/oldkey',
Key: 'newkey'
}
The text was updated successfully, but these errors were encountered: