ユーザー ダウンロード用のサーバー ファイルの提供に問題があります。mod_xsendfile で Apache を使用しています。まず、開発サーバーにファイルをダウンロードしようとすると、ファイルは 0 バイトです。次に、Apache を使用してファイルを提供しようとすると、エラーが発生します。
SuspiciousOperation: 行 document.file.path で ***** へのアクセスが拒否されました
file_name = document.file.name
response = HttpResponse(mimetype='application/force-download')
response['Content-Disposition'] = 'attachment; filename=%s' % smart_str(file_name)
response['X-Sendfile'] = document.file.path
return response
「Xsend On」で mod_xsend を構成しました。助けに感謝します