Код: Выделить всё
function createDownloadLink(blob,encoding) {
fetch('https://localhost:443/process.php', {method: "POST", body: blob}).then( (response) => response.json() ).then( (aidata) => {
textInputG.value = aidata.text;
} );
}
Код: Выделить всё
Код: Выделить всё
function createDownloadLink(blob,encoding) {
const formData = new FormData();
formData.append('blob', blob);
formData.append('text', text);
fetch('https://localhost:443/process.php', {method: "POST", body: formData}).then( (response) => response.json() ).then( (aidata) => {
textInputG.value = aidata.text;
} );
}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79135042/why-exchanging-between-javascript-formdata-and-php-does-not-work[/url]
Мобильная версия