upload.views module

upload.views.handleAjaxUpload(request, *a, **kw)[source]
upload.views.handleUrlDownload(request, *a, **kw)[source]
upload.views.make_thumbnail(pdf_blob)[source]

Takes a PDF file (represented as a string) and returns a pair: - the number of pages - a thumbnail of its first page in PNG (as a string again), or None if anything failed.

upload.views.save_pdf(user, orig_name, pdf_blob)[source]

Given a User and a PDF file represented as a stream, create the UploadedPDF object.

Returns:the status context telling whether the operation has succeded.