fix PeerTube upload: final working solution — simple multipart POST with CURLFile; iterated through Google-resumable PATCH protocol debugging (HTTP version negotiation, chunk body encoding, off-by-one fixes) before settling on simpler POST approach

This commit is contained in:
Pontoporeia
2026-05-11 12:09:19 +02:00
parent 1b0451581d
commit cdec3e96a6
9 changed files with 281 additions and 112 deletions

View File

@@ -143,7 +143,7 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
<?php endif; ?>
<?php endif; ?>
<form action="<?= $formAction ?>" method="post" enctype="multipart/form-data" class="admin-form" data-beforeunload-guard>
<form action="<?= $formAction ?>" method="post" enctype="multipart/form-data" class="admin-form" data-beforeunload-guard data-upload-progress>
<?= $hiddenFields ?>
<?php if (!$adminMode): ?>
@@ -484,6 +484,10 @@ $checkedFormatsForSiteWeb = $checkedFormatsForSiteWeb ?? [];
<?php endif; ?>
<div class="form-footer admin-form-footer">
<div id="upload-progress-wrap" style="display:none;margin-bottom:var(--space-s);width:100%;">
<progress id="upload-progress-bar" value="0" max="100" style="width:100%;height:1.2rem;"></progress>
<span id="upload-progress-text" style="display:block;text-align:center;font-size:var(--step--1);color:var(--text-secondary);margin-top:var(--space-3xs);">0%</span>
</div>
<button type="submit" name="go" class="btn btn--primary"><?= $mode === 'edit' ? 'Enregistrer' : 'Soumettre' ?></button>
<?php if ($mode === 'add' || $mode === 'edit'): ?>
<a href="/admin/" class="btn btn--secondary">Annuler</a>