Closed DylanAndrews closed 7 years ago
A member of my team just directed me to the cause of my issues.
I was adding Prefix
to this.assetParams.s3Params
,
// Skip uploading HTML files
if (/html|htm/.test(ext)) {
params = null
} else {
params = _.assign({}, this.assetParams.s3Params, type, delivery)
}
which is a valid top-level config for uploadDir
/putObject
. It is not, however, a valid config for an individual file. That leads to the “Unexpected key ‘Prefix’ found in params” error. The solution would be this.
// Skip uploading HTML files
if (/html|htm/.test(ext)) {
params = null
} else {
params = _.assign({}, _.pick(this.assetParams.s3Params, ['ACL', 'Bucket']), type, delivery)
}
When I attempt to deploy with a prefix in the
s3Params
I am getting the following error.Unexpected key 'Prefix' found in params
Here is the code for the deploy.
And here are the s3 params
When I go to the suggested url in the documentation I also see that there is nothing regarding a prefix property. Do you see anything wrong with my code or have any recommendations for what I should try? This deploy script works fine as long as the prefix isn't there, so I'm not sure what else the problem could be.