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

Resumable AWS S3 multipart not working with GoldenRetriever #4269

Closed
2 tasks done
lokeshmukeriya opened this issue Jan 9, 2023 · 3 comments
Closed
2 tasks done

Resumable AWS S3 multipart not working with GoldenRetriever #4269

lokeshmukeriya opened this issue Jan 9, 2023 · 3 comments
Labels

Comments

@lokeshmukeriya
Copy link

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

When I configure companion and uppy and start uploading files, abort around 50%, reload my browser, then reupload the same file, it starts at 0% again instead of continuing at 50%.
What is the benefit of using multipart uploads if this feature is not working? Or is golden retriever needed for this? I’ve tried that but that gave errors for the same file.
below is my Uppy code

<script type="module">
    import {Uppy, Dashboard, Tus, AwsS3Multipart, DragDrop, GoldenRetriever, StatusBar} from "https://releases.transloadit.com/uppy/v3.3.1/uppy.min.mjs"
    var uppy = new Uppy()
![Screenshot1 from 2023-01-09 19-29-54](https://user-images.githubusercontent.com/118819167/211325439-0af390c8-aa17-4f01-b4a0-7f51c052e020.png)

        .use(Dashboard, {
          inline: true,
          showProgressDetails: true,
          target: '#drag-drop-area'
        })
        .use(AwsS3Multipart, {
            limit: 6,
            retryDelays: [0, 1000, 3000, 5000, 10000],
            chunkSize: 20971520,
            resume: true,
            removeFingerprintOnSuccess: true,
            companionUrl: '{{env('APP_URL')}}',
        })
        .use(GoldenRetriever, { serviceWorker: true });
        if ('serviceWorker' in navigator) {
            navigator.serviceWorker
            .register("{{ asset('js/sw.js') }}") // path to your bundled service worker with GoldenRetriever service worker
            .then((registration) => {
              console.log('ServiceWorker registration successful with scope: ', registration.scope)
            })
            .catch((error) => {
              console.log(`Registration failed with ${error}`)
            })
        }
    uppy.on('complete', (result) => {
        console.log('Upload complete! We’ve uploaded these files:', result.successful)
    })
</script>

Expected behavior

Resumable AWS S3 multipart should work.

Actual behavior

Not working properly showing an error.
Screenshot1 from 2023-01-09 19-29-54

@Murderlon
Copy link
Member

Murderlon commented Jan 9, 2023

Hi, some observations:

  • Golden Retriever doesn't work with S3 uploads: Resumable uploads with S3 Multipart #2121. You should remove it for now.
  • You're setting many options that don't exist for @uppy/aws-s3-multipart. Perhaps look at the docs again.

@lokeshmukeriya
Copy link
Author

According to documentation golden retriever
support resumable upload after browser refresh. Please help me out with what I am missing here.

doc link: https://uppy.io/docs/golden-retriever/

@Murderlon
Copy link
Member

Murderlon commented Jan 10, 2023

If you have Companion setup correctly, then this should work with pause/resume.

import Uppy from '@uppy/core';
import Dashboard from '@uppy/dashboard';
import AwsS3Multipart from '@uppy/aws-s3-multipart';

import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';

const uppy = new Uppy()
	.use(Dashboard, { inline: true, target: 'body' })
	.use(AwsS3Multipart, { companionUrl: 'http://companion.uppy.io' });

Try testing it with many files.

Note that the bundle you are using consists of most Uppy plugins, so this method is not recommended for production, as your users will have to download all plugins when you are likely using only a few.

And as mentioned, you can't use Golden Retriever with S3 Multipart.

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants