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')
def releaseUploadPromise (eventName): imageName = request.form ['inputParam'] x = dbMgr.deleteImagePromise (imageName) y = dbMgr.deleteImageName (imageName) return jsonify (status = 'True')