Klowner/tussle

cloudflare s3 example maybe broken

phpb-com opened this issue · 4 comments

I tried to play with the CF S3 example (using iDrive E2 storage as an S3 endpoint) and always end-up with the objects named 'files' in the root of the bucket. I am not sure what config is required beyond all of the access/secret/endpoint/etc things. For now I gave up since I did not want to spend digging through the layers of code to see where the problem is. If you have a complete working example that I could learn from, that would be great. Thanks.

The /files is the endpoint path.
https://github.com/Klowner/tussle/blob/main/examples/cloudflare-worker-s3/src/client.ts#L5

In the before-create handler you can alter the location further.

Thanks for the reply. I do understand that /files is the endpoint path. The problem is that the file name ends up with the name '/files' in the object storage and it is not the correct size. I suspect that there is something going on with the multipart upload that is not reassembled right. This is probably due to my config, since I did change the concurrency of the upload.

Ah, are you using the parallel uploads feature of the client? That requires that the server implementation supports the
concatenation extension, which tussle currently does not, so you will definitely have poor results.

Aha, that makes sense. I'll try to combine example with Uppy and remove the concurrency. Sorry about the confusion.