Giter VIP home page Giter VIP logo

fromkeith / fine-uploader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fineuploader/fine-uploader

0.0 0.0 0.0 46.17 MB

Multiple file upload plugin with image previews, drag and drop, progress bars. S3 and Azure support, image scaling, form support, chunking, resume, pause, and tons of other features.

Home Page: http://fineuploader.com

License: MIT License

Makefile 1.27% JavaScript 94.10% CSS 2.15% HTML 2.48%

fine-uploader's People

Contributors

abennouna avatar aldipower avatar allegrem avatar andrew-kzoo avatar bencolon avatar daviesgeek avatar dongxiang avatar feltnerm avatar gabrielnahmias avatar goinnn avatar hlship avatar hulbert avatar joshuaard avatar juukie avatar kjljon avatar koeseph avatar korijn avatar mrjoelkemp avatar nebupookins avatar oldtinroof avatar richsage avatar rnicholus avatar ronnieoverby avatar seanja avatar simoneast avatar six519 avatar skvale avatar sstur avatar symbiat avatar weberhofer avatar

Watchers

 avatar

fine-uploader's Issues

getCredentialsDate

Type of issue [REQUIRED]

Bug

Uploader type [REQUIRED]

S3

Bug details

Fine Uploader version [REQUIRED]

own branch. (fix-3)
However, the error stack is the same as what is in develop.

Browsers where the bug is reproducible [REQUIRED]

Chrome (but should apply to all)

Operating systems where the bug is reproducible [REQUIRED]

Windows 10 (but should apply to all)

Exact steps required to reproduce the issue [REQUIRED]

For example:

  1. Start multipart upload to s3. (v4)
  2. Part way through have your internet connection gets reset
  3. Error thrown from qq.s3.util.getCredentialsDate because the input date is undefined.

All of your Fine Uploader initialization JavaScript code [REQUIRED]

new qq.s3.FineUploaderBasic({
    core: {
        maxConnections: 2
    },
    request: {
        endpoint: 'http://my-endpoint',
        accessKey: 'my-access-key'
    },
    signature: {
        endpoint: 'https://my-endpoint',
        version: 4,
        useWorker: true
    },
    retry: {
        enableAuto: true,
        maxAutoAttempts: 3,
        autoAttemptDelay: 2
    },
    chunking: {
        enabled: true,
        concurrent: {
            enabled: true
        }
    },
    cors: {
        expected: true
    },
    objectProperties: {
        region: 'some-region',
        bucket: 'somebucket',
        key(fileId) {
            var file = uploader.getFile(fileId);
            return file.s3key;
        }
    },
    callbacks: {
        onSubmit(fileId, fileName) {
            // determine proper id and return promise.
        },
        onAutoRetry(fileId, fileName, attemptNumber) {
            // ui stuff
        },
        onManualRetry(fileId, fileName) {
            // ui stuff
        },
        onProgress(fileId, fileName, uploadBytes, totalBytes) {
            // record progress
        },
        onComplete(fileId, fileName, responseJson, xhr) {
            // do ui stuff
        },
        onError() {
            // do ui stuff and manual rety stuff
        },
        onCancel() {
            // do ui stuff
        }
    }
});

Detailed explanation of the problem [REQUIRED]

Here's what I think is happening, but haven't written to the code to test it yet.

  1. request-signer.js::getStringToSignArtifacts call fails to my server. The connection was reset. So the status is 0 and all the promises get rejected.
  2. We then retry the upload/signing.
  3. So request-signer.js::generateHeaders will try to create the authorization string.
  4. This calls signatureConstructor.getRequestDate
  5. However, since the request-signer.js::getStringToSignArtifacts failed, the "artifacts" object is undefined.
  6. Thus getRequestDate returns undefined.
  7. That is passed to qq.s3.util.getCredentialsDate resulting in the error thrown.

I will look into a fix for this.. just wanted to document it so I can come back to it later. And not forget what I think the stack was.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.