root-gg / plik

Plik is a temporary file upload system (Wetransfer like) in Go.

Home Page:https://plik.root.gg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is streaming peer-to-peer?

oupala opened this issue · comments

When plik is streaming, I can read that nothing is stored on the server.

How are the data transferred from the sender to the recipient? Are the data flowing by the server?

sender -> server -> recipient

Are the data flowing from the sender to the recipient directly, peer-to-peer?

sender -> recipient

Hello,

When streaming mode is enabled, it's the download request of the file that triggers the pipeline.

At this moment, the file data is streamed from the sender to the recipient through the server.

So, it's not quite peer to peer.

I'm trying to make a streaming upload, and it does not succeed.

When I upload a new file, I get the following error in the web UI:

Oops ! (-1)

{"status":-1,"message":"Connection failed"}

And I can see an error in the browser console:

Possibly unhandled rejection: {"data":{"status":-1,"message":"Connection failed"},"status":-1,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://plik.url/file/78hP4qaOm1pvCjXP/Rl50teTgW4Xx1eOw/example.mp4","file":{"reference":"0","fileName":"example.mp4","fileSize":774431552,"fileType":"video/mp4","status":"toUpload","id":"Rl50teTgW4Xx1eOw","fileMd5":"","createdAt":"2023-01-17T14:54:16.822271476Z","ngfName":"example.mp4"},"headers":{"X-UploadToken":"0AoMQxlxpAB2XcZnRnIHLdmZed50q7BB","Accept":"application/json, text/plain, /","X-ClientApp":"web_client"},"_isDigested":true,"_chunkSize":null,"_deferred":{"promise":{}}},"statusText":"","xhrStatus":"error"}

Do you have an idea of the origin of the problem?

Could this be linked to a websocket failure?