Skip to content

Instantly share code, notes, and snippets.

@simonedeponti
Last active August 29, 2015 14:22
Show Gist options
  • Save simonedeponti/ad7122d36763bba010bb to your computer and use it in GitHub Desktop.
Save simonedeponti/ad7122d36763bba010bb to your computer and use it in GitHub Desktop.
Attachment API
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.
"""
def has_pdf(obj):
pass
def has_preview(obj):
pass
def has_thumb(obj):
pass
def get_pdf(obj):
pass
def get_preview(obj):
pass
def get_thumb(obj):
pass
def generate_pdf(obj, request):
pass
def generate_preview(obj, request):
pass
def generate_thumb(obj, request):
pass
def generate_all(obj, request):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment