Let the API "rawbytes" response be just that, w/ no file
This commit is contained in:
parent
e82e27acd7
commit
dec0ebba30
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -479,13 +479,16 @@ class APIMasterView(APIView):
|
|||
"""
|
||||
obj = self.get_object()
|
||||
|
||||
filename = self.request.GET.get('filename', None)
|
||||
if not filename:
|
||||
raise self.notfound()
|
||||
path = self.download_path(obj, filename)
|
||||
# TODO: is this really needed?
|
||||
# filename = self.request.GET.get('filename', None)
|
||||
# if filename:
|
||||
# path = self.download_path(obj, filename)
|
||||
# return self.file_response(path, attachment=False)
|
||||
|
||||
response = self.file_response(path, attachment=False)
|
||||
return response
|
||||
return self.rawbytes_response(obj)
|
||||
|
||||
def rawbytes_response(self, obj):
|
||||
raise NotImplementedError
|
||||
|
||||
##############################
|
||||
# autocomplete
|
||||
|
|
Loading…
Reference in a new issue