Backend ja SDK

Tallennus ja sähköposti

Lataa tiedostoja ja lähetä transaktiosähköposteja.

Tiedostojen lataus

const input = document.querySelector('input[type=file]');
const { url, name, size } = await m77.storage.upload(input.files[0]);
await m77.db.create('photos', { url, caption: 'Sunset' });

Tiedostot enintään 10 Mt. Jokainen lataus kuluttaa 1 integraatiokrediitin. Ladatut tiedostot näkyvät Data-välilehdellä.

Sähköposti

await m77.email.send({
  to: '[email protected]',
  subject: 'Your booking is confirmed',
  html: '<h1>See you Friday!</h1><p>Table for 2 at 19:30.</p>',
});

Jokainen sähköposti kuluttaa 1 integraatiokrediitin. Sovellukset voivat lähettää enintään 50 sähköpostia tunnissa.

Ilmoitukset (toastit)

m77.toast('Saved!');
m77.toast('Something went wrong', 'error');