paulcwarren / spring-content

Cloud-Native Storage and Enterprise Content Services (ECMS) for Spring
https://paulcwarren.github.io/spring-content/
Apache License 2.0
268 stars 65 forks source link

File Chunks #2074

Open MoaazSuliman opened 1 month ago

MoaazSuliman commented 1 month ago

Hi All, I'm uploading the large file to azure, Is there are chunk way to can use it for large files?!

paulcwarren commented 1 month ago

Hi @MoaazSuliman ,

What is your issue? Are you encountering OOMs? Or is it just slow? If it is the latter then we could add a property to allow application to specify the buffer size to use like we did recently on JPA when we fixed issue #1944

MoaazSuliman commented 1 month ago

@paulcwarren No I want to divide my file into chunks to can upload the large files without any problems for connection.. is Spring content support chunks?!

why because if I'm uploading large video and the connection stopped, I'll upload it again,, and that's not ok.

for this reason want to use chunks... if the connection stopped for some reason , I'll just upload the not uploaded chunks not the whole large file again...

So my question is, do you support file chunks while uploading it?! Thanks...

paulcwarren commented 1 month ago

do you support file chunks while uploading

No, Spring Content does not support that currently. Supporting byte-ranges on uploads would be the other way we could consider supporting that "restart upload after failure" use case.

MoaazSuliman commented 1 month ago

@paulcwarren is there are documentation for byte-ranges , to know how can I use it. and If the failure happen , the uploading will restart from the beginning?!

paulcwarren commented 1 month ago

SC does not support either currently (byte-ranges are supported on GETs only atm). But byte range PUTs would be less disruptive to the API. Are you using Spring Content REST, or just one of the storage modules?