erickguan commented on issue #6087:
URL: https://github.com/apache/opendal/issues/6087#issuecomment-2828341912

   @Xuanwo I found a blocker on OneDrive API.
   
   > Important: Your app must ensure the total file size specified in the 
Content-Range header is the same for all requests. If a byte range declares a 
different file size, the request will fail.
   
   > Example
   > ```
   > PUT https://sn3302.up.1drv.com/up/fe6987415ace7X4e1eF866337
   > Content-Range: bytes 0-25/128
   > ```
   
   The `WriteGenerator` submits the task when users call `write`. I can't defer 
execution when implementing `MultipartUploadWrite`. Some raw thoughts:
   
   - Add an option to `OpWrite` / `OpWriter`: I see users will complain about 
the obscurity with an option about "deferring write". e.g., Is it 
`Write::write` not going to do something? Or is the service not supporting this 
option.
   - Add a `DeferredMultipartWriter`: very similar to `MultipartWriter` but 
initialize and start upload when users call `Writer::close`. I am hesitant 
about adding special behavior. Any other services might benefit of this?
   - Keep OneDrive service as-is (using `OneShotWrite`): This should be the 
state-of-the-art for OneDrive. It's just a consumer service.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to