@app.route('/col/<sid>/<fn>')
@login_required
def download_single_submission(sid, fn):
 if (('..' in fn) or fn.startswith('/')):
  abort(404)
 try:
  Submission.query.filter((Submission.filename == fn)).one().downloaded = True
  db_session.commit()
 except NoResultFound as e:
  app.logger.error((('Could not mark ' + fn) + (' as downloaded: %s' % (e,))))
 return send_file(store.path(sid, fn), mimetype='application/pgp-encrypted')

@ app . route ( '/col/<sid>/<fn>' ) @ login_required def download_single_submission ( sid , fn ) : if ( ( '..' in fn ) or fn . startswith ( '/' ) ) : abort ( 404 ) try : Submission . query . filter ( ( Submission . filename == fn ) ) . one ( ) . downloaded = True db_session . commit ( ) except NoResultFound as e : app . logger . error ( ( ( 'Could not mark ' + fn ) + ( ' as downloaded: %s' % ( e , ) ) ) ) return send_file ( store . path ( sid , fn ) , mimetype = 'application/pgp-encrypted' )
sends a client the contents of a single submission .