@dropgate/core 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
11
11
|

|
|
12
|
-

|
|
13
13
|

|
|
14
14
|
|
|
15
15
|
[](https://diamonddigital.dev/discord)
|
|
@@ -52,7 +52,7 @@ The package ships with multiple build targets:
|
|
|
52
52
|
```javascript
|
|
53
53
|
import { DropgateClient } from '@dropgate/core';
|
|
54
54
|
|
|
55
|
-
const client = new DropgateClient({ clientVersion: '2.2.
|
|
55
|
+
const client = new DropgateClient({ clientVersion: '2.2.1' });
|
|
56
56
|
|
|
57
57
|
const result = await client.uploadFile({
|
|
58
58
|
host: 'dropgate.link',
|
|
@@ -60,7 +60,7 @@ const result = await client.uploadFile({
|
|
|
60
60
|
secure: true,
|
|
61
61
|
file: myFile, // File or Blob
|
|
62
62
|
lifetimeMs: 3600000, // 1 hour
|
|
63
|
-
maxDownloads: 5, //
|
|
63
|
+
maxDownloads: 5, // Limit number of downloads
|
|
64
64
|
encrypt: true,
|
|
65
65
|
onProgress: ({ phase, text, percent }) => {
|
|
66
66
|
console.log(`${phase}: ${text} (${percent ? percent : 0}%)`);
|
|
@@ -91,7 +91,7 @@ console.log('P2P enabled:', serverInfo.capabilities?.p2p?.enabled);
|
|
|
91
91
|
```javascript
|
|
92
92
|
import { DropgateClient } from '@dropgate/core';
|
|
93
93
|
|
|
94
|
-
const client = new DropgateClient({ clientVersion: '2.2.
|
|
94
|
+
const client = new DropgateClient({ clientVersion: '2.2.1' });
|
|
95
95
|
|
|
96
96
|
// checkCompatibility fetches server info internally and compares versions
|
|
97
97
|
const compat = await client.checkCompatibility({
|
|
@@ -203,7 +203,7 @@ const session = await startP2PReceive({
|
|
|
203
203
|
```javascript
|
|
204
204
|
import { DropgateClient } from '@dropgate/core';
|
|
205
205
|
|
|
206
|
-
const client = new DropgateClient({ clientVersion: '2.2.
|
|
206
|
+
const client = new DropgateClient({ clientVersion: '2.2.1' });
|
|
207
207
|
|
|
208
208
|
// Download with streaming (for large files)
|
|
209
209
|
const result = await client.downloadFile({
|