Esempio n. 1
0
def confirmImageUpload (eventName):
  imageName = request.form ['imageName']
  ## Should we store image again?
  image = request.files ['image']
  app.logger.debug ('confirmImageUpload : ' + imageName + ' : '+ eventName)
  x = dbMgr.isEventPresent (eventName)
  if x == -1:
    return jsonify (status = 'True')
  x = dbMgr.insertNewImage (imageName, eventName)
  if x == 0:
    x = dbMgr.deleteImagePromise (imageName)
    return jsonify (status = 'True')
  else:
    return jsonify (status = 'False') 
Esempio n. 2
0
def releaseUploadPromise (eventName):
  imageName = request.form ['inputParam']
  x = dbMgr.deleteImagePromise (imageName)
  y = dbMgr.deleteImageName (imageName)
  return jsonify (status = 'True')