MCPcopy Create free account
hub / github.com/ShareDropio/sharedrop / uploadFile

Function uploadFile

app/components/peer-widget.js:51–64  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

49 actions: {
50 // TODO: rename to something more meaningful (e.g. askIfWantToSendFile)
51 uploadFile(data) {
52 const { peer } = this;
53 const { files } = data;
54
55 peer.set('state', 'is_preparing_file_transfer');
56 peer.set('bundlingProgress', 0);
57
58 // Cache the file, so that it's available
59 // when the response from the recipient comes in
60 this._reduceFiles(files).then((file) => {
61 peer.set('transfer.file', file);
62 peer.set('state', 'has_selected_file');
63 });
64 },
65
66 sendFileTransferInquiry() {
67 const { webrtc } = this;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected