-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements for DownloadHandler #11421
Comments
mattiagiupponi
added a commit
that referenced
this issue
Aug 28, 2023
12 tasks
mattiagiupponi
added a commit
that referenced
this issue
Aug 28, 2023
mattiagiupponi
added a commit
that referenced
this issue
Aug 28, 2023
12 tasks
mattiagiupponi
added a commit
that referenced
this issue
Aug 28, 2023
mattiagiupponi
added a commit
that referenced
this issue
Aug 31, 2023
mattiagiupponi
added a commit
that referenced
this issue
Aug 31, 2023
mattiagiupponi
added a commit
that referenced
this issue
Aug 31, 2023
mattiagiupponi
added a commit
that referenced
this issue
Sep 1, 2023
mattiagiupponi
added a commit
that referenced
this issue
Sep 4, 2023
mattiagiupponi
added a commit
that referenced
this issue
Sep 4, 2023
mattiagiupponi
added a commit
that referenced
this issue
Sep 4, 2023
giohappy
added a commit
that referenced
this issue
Sep 8, 2023
* [Fixes #11421] Improvements for DownloadHandler * [Fixes #11421] Fix tests * [Fixes #11421] Fix tests * [Fixes #11421] Fix tests * [Fixes #11421] Improve module import in download handlers * [Fixes #11421] Improve module import in download handlers * [Fixes #11335] fix flake8 * [Fixes #11421] fix broken test * [Fixes #11421] Test fix tests * [Fixes #11421] rollback test changes * [Fixes #11421] Test order response value * [Fixes #11421] Fix flake8 and black issues * improve ajax_safe logic, extended tests * remove unused import * remove unused import (2) * fixed custom download handler test * fix * black fix * removed old parameter --------- Co-authored-by: G. Allegri <[email protected]>
mattiagiupponi
added a commit
that referenced
this issue
Oct 13, 2023
This was referenced Oct 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a follow-up of this issue #11296 we want to introduce a new set of improvement for the download handler.
This improvements will help to make room for an API that supports multiple downloads (in the future)
Datasets
DownloadHandler
toDatasetDownloadHandler
, and move it under thelayers
moduleDatasetDownloadHandler
implements anis_ajax_safe
method which will return a boolean -> whether thedownload_url
can be called with AJAX or not. For the default handler it will be:true
forWPS
false
for all the other casesbuild_absolute_uri
. The logic of whether to return any "original" Link (created manually or received from previous DBs) will be moved to theDatasetDownloadHandler
.Documents
Document.download_is_ajax_safe
property returningtrue
if the resource is LOCAL,false
otherwise.API
download_urls
array property for theResourceBaseSerializer
with the following structure:download_urls
will contain only one entry;DatasetDownloadHandler
. NOTICE that for REMOTE resources (e.g. services)download_urls
should return an empty array. Let's think if it will be the serializer to handle this case, or letDatasetDownloadHandler
return the download_url object itself (which would beNone
for REMOTE datasets).Document.download_url
andDocument.download_is_ajax_safe
download_url
field.The text was updated successfully, but these errors were encountered: