soarecostin / file-vault

A Laravel package for encrypting and decrypting files of any size
MIT License
184 stars 63 forks source link

Fix for smaller sized chunks from s3: added check the last chunk size #20

Closed gbalduzzi closed 9 months ago

gbalduzzi commented 2 years ago

Fixed the bug discussed in #19

It fixed the issue in my codebase and I verified it through some custom logs (I received a smaller sized last chunk and it recovered correctly by requesting the chunk again, without raising any failure exception).

However, I am not able to write a test case able to replicate the reception of a wrong sized chunk, any help or indication would be much appreciated

Hope it helps,

flywolfcreative commented 2 years ago

Using this fix in my own project. Works fine so far, thanks.