upload url image or file to ipfs

This commit is contained in:
ericz committed 2026-10-11 13:14:14 +02:00
1 parent 9609a8231d
commit a4a7e00732
33 files changed
+2594 -81

No files matched your search

+17
View File
@@ -443,6 +443,23 @@ void main() {
expect(settings.evictDiscoveredContactsEnabled, isFalse);
});
test('public IPFS gateway defaults to deactivated and preserves empty', () {
expect(AppSettings.fromJson({}).publicIpfsGateway, isEmpty);
expect(
AppSettings.fromJson({'public_ipfs_gateway': ''}).publicIpfsGateway,
isEmpty,
);
});
test('empty upload gateway does not fall back to the download gateway', () {
final settings = AppSettings(
publicIpfsGateway: 'https://gateway.example.com/ipfs/',
uploadIpfsGateway: '',
);
expect(settings.effectiveUploadIpfsGateway, isEmpty);
});
test(
'fromJson with missing new fields uses defaults (backward compat)',
() {