Skip to content
New issue

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

Page refreshing on Firefox when hitting signer url #456

Open
treetop1500 opened this issue Jul 31, 2020 · 2 comments
Open

Page refreshing on Firefox when hitting signer url #456

treetop1500 opened this issue Jul 31, 2020 · 2 comments

Comments

@treetop1500
Copy link

I'm experiencing an odd behavior where in Firefox 66, the page seems to refresh when the signer url is hit or somewhere around that in the process. Chrome and Safari latest versions are working flawlessly.

My method for uploading is below. I'm using a PHP controller to handled signing at the /aws-signer route. I've also tried using the full URL to that route and the problem persists.

My package.json file is require evaporate.js as such "evaporate": "^2.1.4",

function uploadToS3(files,entityId)
        {
            if (isValid(files)) {

                /**
                 * evaporate.js config
                 */
                let evaporateConfig = {
                    signerUrl: "/aws-signer",
                    aws_key: "(my key)",
                    bucket: "(my bucket)",
                    computeContentMd5: true,
                    cryptoMd5Method: function (data) {
                        return AWS.util.crypto.md5(data, 'base64');
                    },
                    cryptoHexEncodedHash256: function (data) {
                        return AWS.util.crypto.sha256(data, 'hex');
                    },
                }

                return Evaporate.create(evaporateConfig)
                    .then(function (evaporate) {

                        evaporate.add(
                            {
                                file: files[0],
                                name: +timestamp+"-"+files[0].name,
                                progress: (progressValue) => updateUploadStatus(progressValue),
                                complete: (_xhr, awsKey) => console.log('Complete!', awsKey),
                            }
                        )
                        .then(function (awsObjectKey) {
                                uploadComplete(awsObjectKey);
                                console.log('File successfully uploaded to:', awsObjectKey);
                            },
                            function (reason) {
                                console.log('File did not upload sucessfully:', reason);
                            });
                    });
            } else {
                uploadError("Invalid File Type");
            }
@treetop1500
Copy link
Author

After looking at this on a staging server (the above) was occurring on my localhost, the refresh is happening at various states in the upload process, not just at the signer request.

@jakubzitny
Copy link
Collaborator

Can you please provide a full repro? We can have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants