Aws S3 getUploadParameters help


I’m trying to get AwsS3 working with getUploadParameters in React + Node.js. I’m not sure what I am doing wrong, but I keep running into the error:

AwsS3: got incorrect result from 'getUploadParameters()' for file '24px.png', expected an object '{ url, method, fields, headers }'.

I have looked at this issue: but I still seem to be getting this error.
My front-end code:

                .use(AwsS3, {
                    getUploadParameters(file) {
                        axios.get('/api/aws/signUrl/put', {
                            params: {
                                contentType: file.type,
                                bucket: props.bucket,
                                directory: 'test'
                            .then((result) => {
                                return {
                                    headers: {}
                            .catch((err) => {

my back-end code:

router.get('/signUrl/put', function (req, res, next) {
    const key = `${}/${shortid.generate()}` // for the chat, it will be the participant_id
    s3.getSignedUrl('putObject', {
        Bucket: req.query.bucket,
        Key: key,
        Expires: 180,
        ContentType: req.query.contentType,
        Metadata: {
            fileName: req.query.fileName,
    }, (err, url) => {
        if (err) {
            res.status(500).json('Internal server error')
        } else {
            res.status(200).json({ url: url, key: key, method: 'put', fields: {} })

my console.log of my console.log( looks good, but i still seem to be getting this error.

fields: {}
key: "test/9QJJEP0uy"
method: "put"
url: ""

Any help would be appreciated!


It seems to be my back-end aws-sdk function, since the URL that is generated keeps giving me the error:

The request signature we calculated does not match the signature you provided. Check your key and signing method.

In your first snippet, the result of axios.get() was not being returned from getUploadParameters(), so Uppy instead saw undefined. Changing it to return axios.get()... should fix that problem.

Given your second post, I assume you did so already? :smiley:

If so I’m not sure what would cause that second error yet … the signing code looks right to me, unfortunately AWS doesn’t give a lot of detail in this type of error message :confused: