Add image attachments to feedback form (JPEG/PNG)
- File input in feedback modal (max 3 images, 5 MB each) - Frontend validation for file count and size - Backend: multipart/form-data with UploadFile, MIME attachments - Images attached to feedback email as base64-encoded attachments - Only JPEG and PNG allowed (validated server-side) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -197,6 +197,23 @@ const API = {
|
||||
return this._request('POST', '/feedback', data);
|
||||
},
|
||||
|
||||
async sendFeedbackForm(formData) {
|
||||
const token = localStorage.getItem('osint_token');
|
||||
const controller = new AbortController();
|
||||
const timeout = setTimeout(() => controller.abort(), 60000);
|
||||
const resp = await fetch(this.baseUrl + '/feedback', {
|
||||
method: 'POST',
|
||||
headers: { 'Authorization': token ? 'Bearer ' + token : '' },
|
||||
body: formData,
|
||||
signal: controller.signal,
|
||||
});
|
||||
clearTimeout(timeout);
|
||||
if (!resp.ok) {
|
||||
const err = await resp.json().catch(() => ({}));
|
||||
throw new Error(err.detail || 'Fehler ' + resp.status);
|
||||
}
|
||||
},
|
||||
|
||||
// Export
|
||||
exportIncident(id, format, scope) {
|
||||
const token = localStorage.getItem('osint_token');
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren