feat(upload): pending lifecycle for upload-on-select images
Mark front-end uploads (comment/ticket/report) as pending, return the
attachment id, discard own pending uploads on remove via
DELETE /upload/pending/{id}, claim referenced URLs on successful submit,
and purge unclaimed uploads older than 24h with an hourly cron.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a308f96837
commit
ac3ed9c956
9 files changed
+247
-2
No files matched your search
@@ -450,6 +450,8 @@ trait UserControllerReportOperations {
|
||||
);
|
||||
|
||||
if ($report_id > 0) {
|
||||
// 举证图片以 URL 拼入举报内容,提交成功即认领。
|
||||
\AKSRT\Attachment\PendingUploads::claim_text($reason, $reporter_id);
|
||||
return $this->success([
|
||||
'message' => __('举报已提交,我们会尽快处理', 'aksrt'),
|
||||
'data' => ['report_id' => $report_id],
|
||||
|
||||
Reference in new issue
Block a user