Fixed new download redirect route
This commit is contained in:
parent
fbe17cc10a
commit
dce59f3b88
2 changed files with 5 additions and 5 deletions
|
|
@ -488,7 +488,7 @@ app.add_url_rule(
|
||||||
|
|
||||||
|
|
||||||
class CaptureDownloadRedirectAPI(MicroscopeView):
|
class CaptureDownloadRedirectAPI(MicroscopeView):
|
||||||
def get(self, capture_id, filename):
|
def get(self, capture_id):
|
||||||
"""
|
"""
|
||||||
Redirect to download the capture under it's currently set filename.
|
Redirect to download the capture under it's currently set filename.
|
||||||
I.e., `/(capture_id)/download` will
|
I.e., `/(capture_id)/download` will
|
||||||
|
|
@ -511,7 +511,7 @@ class CaptureDownloadRedirectAPI(MicroscopeView):
|
||||||
|
|
||||||
# Route for shortcut where no filename is specified
|
# Route for shortcut where no filename is specified
|
||||||
app.add_url_rule(
|
app.add_url_rule(
|
||||||
uri('/capture/<capture_id>/download/'),
|
uri('/capture/<capture_id>/download'),
|
||||||
view_func=CaptureDownloadRedirectAPI.as_view('capture_download_redirect', microscope=api_microscope))
|
view_func=CaptureDownloadRedirectAPI.as_view('capture_download_redirect', microscope=api_microscope))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ class StreamObject(object):
|
||||||
# Store file format
|
# Store file format
|
||||||
self.format = fmt
|
self.format = fmt
|
||||||
|
|
||||||
|
# Keep on disk after close by default
|
||||||
|
self.keep_on_disk = keep_on_disk
|
||||||
|
|
||||||
# Create file name. Default to UUID
|
# Create file name. Default to UUID
|
||||||
if not filename:
|
if not filename:
|
||||||
filename = self.id
|
filename = self.id
|
||||||
|
|
@ -46,9 +49,6 @@ class StreamObject(object):
|
||||||
logging.debug("Target for {} set to 'file'".format(self.id))
|
logging.debug("Target for {} set to 'file'".format(self.id))
|
||||||
self.target = self.file
|
self.target = self.file
|
||||||
|
|
||||||
# Keep on disk after close by default
|
|
||||||
self.keep_on_disk = keep_on_disk
|
|
||||||
|
|
||||||
# Log if created by context manager
|
# Log if created by context manager
|
||||||
self.context_manager = False
|
self.context_manager = False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue