backend.globaleaks.handlers.attachment

Module Contents

Classes

SubmissionAttachment Whistleblower interface to upload a new file for a non-finalized submission
PostSubmissionAttachment Whistleblower interface to upload a new file for an existing submission

Functions

register_ifile_on_db(session, tid, internaltip_id, uploaded_file) Register a file on the database
backend.globaleaks.handlers.attachment.register_ifile_on_db(session, tid, internaltip_id, uploaded_file)[source]

Register a file on the database

Parameters:
  • session – An ORM session
  • tid – A tenant id
  • internaltip_id – A id of the submission on which attaching the file
  • uploaded_file – A file to be attached
Returns:

A descriptor of the file

class backend.globaleaks.handlers.attachment.SubmissionAttachment[source]

Bases: globaleaks.handlers.base.BaseHandler

Whistleblower interface to upload a new file for a non-finalized submission

check_roles = none[source]
upload_handler = True[source]
post(self, token_id)[source]
class backend.globaleaks.handlers.attachment.PostSubmissionAttachment[source]

Bases: backend.globaleaks.handlers.attachment.SubmissionAttachment

Whistleblower interface to upload a new file for an existing submission

check_roles = whistleblower[source]
upload_handler = True[source]
post(self)[source]