Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表,其中有一个包含一些数据的 blob 列,如何在 django 中下载 blob 内容?我尝试了这里提到的解决方案,但它对我不起作用
def download_blob(request, id): contents = BlobModel.objects.get(id=id).blob_field response = HttpResponse(contents) response['Content-Disposition'] = 'attachment; filename=blob.bin' return response