Conversation
In our project, we faced with the possibility to upload several identical files to one s3 bucket to the separate subfolders. This cause the s3 upload error: was uploaded the only first file from the list of identical files. This patch for the fix parallel uploads of identical files.
bikeath1337
left a comment
There was a problem hiding this comment.
The available option allowS3ExistenceOptimization might work for your needs, but then you would not benefit from that optimization. Refer to the wiki for more information.
| // The key tries to give a signature to a file in the absence of its path. | ||
| // "<filename>-<mimetype>-<modifieddate>-<filesize>" | ||
| return [ | ||
| fileUpload.name, // fix for parallel uploads of identical files |
There was a problem hiding this comment.
Unfortunately, this breaks compatibility and a key feature of EvaporateJS: the ability to retry failed transfers. You can see which specs fail by running the test suite.
There was a problem hiding this comment.
Maybe I did something wrong, but in my case when I tried to upload the same file simultaneously to the one bucket to the separated directories. Evaporate's library tried to retry upload that file and I had one result in all tries - the first file upload was done successfully, all others - not. In this process, the library sends me notifications about file uploading progress and the success event. But files didn't upload.
|
I changed fileUpload.name to the fileUpload.awsKey. Maybe this will be okay for your tests? I tried use allowS3ExistenceOptimization with true and false values without success. |
In our project, we faced with the possibility to upload several identical files to one s3 bucket to the separate subfolders. This cause the s3 upload error: was uploaded the only first file from the list of identical files. This patch for the fix parallel uploads of identical files.