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

SG-30400 Retrieve thumbnails from any FileItem that has a 'thumbnail_path' #127

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kennedy0
Copy link

The filter_work_files hook allows you to provide a thumbnail, but it's not used due to the file_item.is_published requirement in the FileModel._process_files method. This leaves us unable to show thumbnails for working files.

With this requirement removed, the filter_work_files hook can provide thumbnails as a file URI:

class FilterWorkFiles(HookClass):
    def execute(self, work_files, **kwargs):
        for wf in work_files:
            wf['work_file']['thumbnail'] = "file:///my_thumbnail.jpg"
        return work_files

@carlos-villavicencio-adsk carlos-villavicencio-adsk changed the title Retrieve thumbnails from any FileItem that has a 'thumbnail_path' SG-30400 Retrieve thumbnails from any FileItem that has a 'thumbnail_path' Mar 21, 2023
@carlos-villavicencio-adsk
Copy link
Contributor

Thank you for this contribution. We will review this internally before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants