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

restart upload different destination #461

Open
Djolivald opened this issue Oct 30, 2020 · 3 comments
Open

restart upload different destination #461

Djolivald opened this issue Oct 30, 2020 · 3 comments

Comments

@Djolivald
Copy link

Hi, I am having an issue with upload restart.
When cancelling an upload Evaporate save the file/md5 in cache. My issue is that if the user decides to reupload the same file it will restart the old upload regardless of the new upload destination.

I think the upload destination should be matching (along with the md5) for a file to continue upload. I end up in situations where I detect the upload as being dead/cancelled server side, deleting the upload and parts in S3 and creating a new record for the new upload, but Evaporate still uploads to the old location.

Alternatively, is it possible to prevent the upload restart mechanism altogether? I prefer to lose the feature to allow to restart uploads over having users uploading to the wrong destination.

Thanks!

@jakubzitny
Copy link
Collaborator

Hi @Djolivald, can you please create a minimal reproduction repo where this is happening? We're using Evaporate and probably had very similar cases but the problem was not happening.

@Djolivald
Copy link
Author

Djolivald commented Nov 2, 2020

Sure thing, if you use the example from the repo set it up with your AWS creds/bucket/signing url.

Uploading a file named large_test.mp4:
The console outputs started uploads/large_test.mp495.45298906767776
This entry in awsUploads in application storage

{
   "large_test.mp4-video/mp4-2020-10-25T19:25:28.517Z-4489775427":{
      "awsKey":"large_test.mp495.45298906767776",
      "bucket":"uploads",
      "uploadId":"....",
      "fileSize":4489775427,
      "fileType":"video/mp4",
      "lastModifiedDate":"2020-10-25T19:25:28.517Z",
      "partSize":6291456,
      "signParams":{
         
      },
      "createdAt":"2020-11-02T16:07:59.254Z",
      "firstMd5Digest":"rq7kVMTInphzU4zw4F8WZw=="
   }
}

Then cancel the upload, and create an new one with the same file.
The console outputs started uploads/large_test.mp432.831321426160606
There is no new entry in the application storage (and the old one did not change) and the network request are going to https://bucket.s3.amazonaws.com/uploads/large_test.mp495.45298906767776?uploadId=...
Note the upload request is done on the first upload location

@Djolivald
Copy link
Author

Djolivald commented Nov 9, 2020

Hey @jakubzitny Just wanted to check whether you have a way to prevent this behaviour? My temporary solution is to wipe the application storage before each upload... Not very sexy

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