-
-
Save wengole/a24a679f90c3d2370a64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_and_add(file_upload, obj, workspace=None, token=None): | |
"""Extracts temporary attachments from storage and attaches them into `obj` | |
Extract file data `from file_upload`, create file/image objects and add | |
them as attachments to ``obj``. If workspace and token are given, reuse | |
previously uploaded temporary attachments if they exist. | |
""" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
def get(obj): | |
"""Get the preview images for the given object | |
If there are currently no previews an empty list will be returned | |
:param obj: The Plone object to get previews for | |
:type obj: A Plone content object | |
:return: The preview images | |
:rtype: list | |
""" | |
return [] | |
def create(obj, request): | |
"""Generate the preview images for the given content object | |
:param obj: The Plone object to get previews for | |
:type obj: A Plone content object | |
:param request: The Plone request object | |
:type request: HTTPRequest | |
""" | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment