Skip to content
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

Basic asset response support #217

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Basic asset response support #217

merged 2 commits into from
Sep 16, 2024

Commits on Sep 16, 2024

  1. feat: Authoring API support for component assets

    This adds a number of API calls to the Authoring public API in order to
    support associating static assets with Components and allowing them to
    be downloaded.
    
    Added:
    
    * get_component_by_uuid
    * get_component_version_by_uuid
    * get_content_info_headers
    * get_redirect_response_for_component_asset
    
    Modified:
    
    * create_next_component_version - made title optional
    * create_component_version_content - annotation for learner_downloadable
    
    Most of the justification for this approach can be found in the
    docstring for get_redirect_response_for_component_asset.
    
    Note that there is currently no backend redis/memcached caching of the
    ComponentVersion and Content information. This means that every time a
    request is made, we will do a couple of database queries in order to do
    this lookup. I had actually done a version with such caching in an
    earlier iteration of this PR, but it added a lot of complexity for what
    I thought would be minimal gain, since going through the middleware will
    cause about 20 database queries anyway.
    
    This implements the first part of the static assets ADR for Learning
    Core: openedx#110
    
    Important notes:
    
    * No view or auth is implemented. That is the responsibility of
      edx-platform. Learning Core only provides the storage and response
      generation.
    * The responses generated will require the use of a reverse proxy that
      can handle the X-Accel-Redirect header. See ADR for details.
    ormsbee committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    72efdc0 View commit details
    Browse the repository at this point in the history
  2. chore: bump version to 0.12.0

    ormsbee committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3e25927 View commit details
    Browse the repository at this point in the history