cs3org / wopiserver

A vendor-neutral application gateway compatible with the WOPI specifications.
Apache License 2.0
55 stars 26 forks source link

Use Flask stream when writing data to storage #141

Closed glpatcern closed 9 months ago

glpatcern commented 10 months ago

Supersedes https://github.com/cs3org/wopiserver/pull/138.

We use the flask write stream to spare an in-memory buffer copy (the actual request is still processed in one go as it's a POST).

The writefile() signature was changed to accept either a byte[] buffer or a stream as content, and the size as an extra parameter (-1 would mean that the function must compute it assuming content is a buffer).

To be tested for all interfaces:

wkloucek commented 10 months ago

@micbar @DeepDiver1975 can you please test this with oCIS / the CS3 interface or schedule it to the testing to the team?

DeepDiver1975 commented 10 months ago

time wise out of scope on my end - sorry :cry:

glpatcern commented 9 months ago

With the help of @aduffeck we successfully tested this with all backends, therefore I'll proceed with merging it.