feat(market): host and publish the cover photo with each offer
Wire the Blossom MediaTransport into publishing: shareable lots carry their varietyId, publishLots uploads the lot's cover photo and puts the returned URL on the offer (best-effort — a hosting failure still publishes the offer, just without a photo). Add a configurable media server (Comunes default, empty to opt out) to settings and the market advanced config.
This commit is contained in:
parent
5bc1715637
commit
fa53295439
17 changed files with 280 additions and 22 deletions
|
|
@ -35,6 +35,7 @@ void main() {
|
|||
type: OfferType.gift,
|
||||
category: 'Solanaceae',
|
||||
approxGeohash: 'sp3e9xyz',
|
||||
imageUrl: 'https://media.test/tomate.jpg',
|
||||
));
|
||||
expect(published.accepted, isTrue, reason: published.message);
|
||||
|
||||
|
|
@ -43,6 +44,7 @@ void main() {
|
|||
expect(found, hasLength(1));
|
||||
expect(found.single.summary, 'Tomate rosa de Barbastro');
|
||||
expect(found.single.authorPubkeyHex, alice.publicKeyHex);
|
||||
expect(found.single.imageUrl, 'https://media.test/tomate.jpg');
|
||||
|
||||
await aliceT.close();
|
||||
await bobT.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue