Skip to content

Commit 32471db

Browse files
authored
Merge pull request #57 from WillTDA/3.0.5
3.0.5 - Fix progess calculation in core, update web UI and client cor…
2 parents a1e048d + ecdad2d commit 32471db

14 files changed

Lines changed: 61 additions & 24 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ body:
5656
attributes:
5757
label: Server Version
5858
description: The Dropgate server version (shown in /api/info or the footer).
59-
placeholder: e.g. 3.0.4
59+
placeholder: e.g. 3.0.5
6060

6161
- type: input
6262
id: browser

client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div align="center">
1010

1111
![license](https://img.shields.io/badge/license-GPL--3.0-blue?style=flat-square)
12-
![version](https://img.shields.io/badge/version-3.0.4-brightgreen?style=flat-square)
12+
![version](https://img.shields.io/badge/version-3.0.5-brightgreen?style=flat-square)
1313
![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)
1414

1515
[![discord](https://img.shields.io/discord/667479986214666272?logo=discord\&logoColor=white\&style=flat-square)](https://diamonddigital.dev/discord)

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dropgate-client",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "A self-hostable, privacy-first file sharing system with both hosted upload and direct P2P transfer capabilities.",
55
"main": "src/main.js",
66
"funding": {

client/src/dropgate-core.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dropgate-core/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div align="center">
1010

1111
![license](https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square)
12-
![version](https://img.shields.io/badge/version-3.0.4-brightgreen?style=flat-square)
12+
![version](https://img.shields.io/badge/version-3.0.5-brightgreen?style=flat-square)
1313
![typescript](https://img.shields.io/badge/TypeScript-5.0+-blue?style=flat-square)
1414

1515
[![discord](https://img.shields.io/discord/667479986214666272?logo=discord&logoColor=white&style=flat-square)](https://diamonddigital.dev/discord)
@@ -55,7 +55,7 @@ All operations go through a single `DropgateClient` instance. Server connection
5555
import { DropgateClient } from '@dropgate/core';
5656

5757
const client = new DropgateClient({
58-
clientVersion: '3.0.4',
58+
clientVersion: '3.0.5',
5959
server: 'https://dropgate.link', // URL string or { host, port?, secure? }
6060
fallbackToHttp: true, // auto-retry HTTP if HTTPS fails (optional)
6161
});
@@ -422,7 +422,7 @@ For browser environments, you can use the IIFE bundle:
422422
<script src="/path/to/dropgate-core.browser.js"></script>
423423
<script>
424424
const { DropgateClient } = DropgateCore;
425-
const client = new DropgateClient({ clientVersion: '3.0.4', server: location.origin });
425+
const client = new DropgateClient({ clientVersion: '3.0.5', server: location.origin });
426426
// ...
427427
</script>
428428
```
@@ -432,7 +432,7 @@ Or as an ES module:
432432
```html
433433
<script type="module">
434434
import { DropgateClient } from '/path/to/dropgate-core.js';
435-
const client = new DropgateClient({ clientVersion: '3.0.4', server: location.origin });
435+
const client = new DropgateClient({ clientVersion: '3.0.5', server: location.origin });
436436
// ...
437437
</script>
438438
```

packages/dropgate-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dropgate/core",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "Headless Dropgate client library for file uploads and P2P transfers.",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/dropgate-core/src/client/DropgateClient.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,8 +1373,6 @@ export class DropgateClient {
13731373

13741374
pendingChunks.push(value);
13751375
pendingLength += value.length;
1376-
receivedBytes += value.length;
1377-
if (onBytesReceived) onBytesReceived(receivedBytes);
13781376

13791377
while (pendingLength >= ENCRYPTED_CHUNK_SIZE) {
13801378
const buffer = flushPending();
@@ -1385,13 +1383,17 @@ export class DropgateClient {
13851383
}
13861384

13871385
const decryptedBuffer = await decryptChunk(this.cryptoObj, encryptedChunk, cryptoKey);
1386+
receivedBytes += decryptedBuffer.byteLength;
1387+
if (onBytesReceived) onBytesReceived(receivedBytes);
13881388
if (onChunk) await onChunk(new Uint8Array(decryptedBuffer));
13891389
}
13901390
}
13911391

13921392
if (pendingLength > 0) {
13931393
const buffer = flushPending();
13941394
const decryptedBuffer = await decryptChunk(this.cryptoObj, buffer, cryptoKey);
1395+
receivedBytes += decryptedBuffer.byteLength;
1396+
if (onBytesReceived) onBytesReceived(receivedBytes);
13951397
if (onChunk) await onChunk(new Uint8Array(decryptedBuffer));
13961398
}
13971399
} else {

server/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div align="center">
1010

1111
![license](https://img.shields.io/badge/license-AGPL--3.0-blue?style=flat-square)
12-
![version](https://img.shields.io/badge/version-3.0.4-brightgreen?style=flat-square)
12+
![version](https://img.shields.io/badge/version-3.0.5-brightgreen?style=flat-square)
1313
![docker](https://img.shields.io/badge/docker-supported-blue?style=flat-square)
1414

1515
[![discord](https://img.shields.io/discord/667479986214666272?logo=discord&logoColor=white&style=flat-square)](https://diamonddigital.dev/discord)
@@ -138,7 +138,7 @@ Example response:
138138
```json
139139
{
140140
"name": "Dropgate Server",
141-
"version": "3.0.4",
141+
"version": "3.0.5",
142142
"logLevel": "INFO",
143143
"capabilities": {
144144
"upload": {

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dropgate-server",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "A self-hostable, privacy-first file sharing system with both hosted upload and direct P2P transfer capabilities.",
55
"main": "server.js",
66
"funding": {

server/public/js/download-bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const iconContainer = document.getElementById('icon-container');
2121
const card = document.getElementById('status-card');
2222
const encryptionStatement = document.getElementById('encryption-statement');
2323

24-
const client = new DropgateClient({ clientVersion: '3.0.4', server: location.origin });
24+
const client = new DropgateClient({ clientVersion: '3.0.5', server: location.origin });
2525

2626
const bundleState = {
2727
bundleId: null,

0 commit comments

Comments
 (0)