This pull request includes several changes to improve the handling of CDN links and refactor related code. The most important changes include moving the CDN link generation logic to the project_storage.py file, updating the get_project_file function to use the new method, and cleaning up unused imports and methods.
Refactoring and improvements:
ayon_server/files/project_storage.py: Added a new method get_cdn_link to handle the generation of CDN links directly within the ProjectStorage class.
api/files/files.py: Updated the get_project_file function to use the new get_cdn_link method from the ProjectStorage class instead of the removed get_cdn_link function.
Code cleanup:
ayon_server/helpers/cdn.py: Removed the entire file, which included the now redundant get_cdn_link function and other unused imports.
ayon_server/files/project_storage.py: Fixed a bug in the get_path method by correcting the project_dirname to use self.project_name instead of project_dirname.
This pull request includes several changes to improve the handling of CDN links and refactor related code. The most important changes include moving the CDN link generation logic to the
project_storage.py
file, updating theget_project_file
function to use the new method, and cleaning up unused imports and methods.Refactoring and improvements:
ayon_server/files/project_storage.py
: Added a new methodget_cdn_link
to handle the generation of CDN links directly within theProjectStorage
class.api/files/files.py
: Updated theget_project_file
function to use the newget_cdn_link
method from theProjectStorage
class instead of the removedget_cdn_link
function.Code cleanup:
ayon_server/helpers/cdn.py
: Removed the entire file, which included the now redundantget_cdn_link
function and other unused imports.ayon_server/files/project_storage.py
: Cleaned up imports by addinghttpx
andRedirectResponse
, and removing unused imports. [1] [2]Bug fixes:
ayon_server/files/project_storage.py
: Fixed a bug in theget_path
method by correcting theproject_dirname
to useself.project_name
instead ofproject_dirname
.