def uploadImage(username, blob, filename, token, secret, tags):

    rtnBlobList = uploadBlob(username, blob, filename, token, secret)
    if len(rtnBlobList)  == 1:
        return rtnBlobList[0]

    return 'success'
def uploadImage(username, blob, filename, token, secret, tags):

    rtnBlobList = uploadBlob(username, blob, filename, token, secret)
    if len(rtnBlobList) == 1:
        return rtnBlobList[0]

    return 'success'
def uploadImageJSON(username, blob, filename, token, secret, tags):
    oauth_verify_code = verifyOauth(token, secret)
    if oauth_verify_code != 200:
        return oauth_error_json

    rtnBlobList = uploadBlob(username, blob, filename)
    if len(rtnBlobList) < 2:
        return upload_image_blob_error_json

    rtnDocumentdbMsg = makeMetadata(username, filename, tags.split(","), rtnBlobList[0], rtnBlobList[1])
    if rtnDocumentdbMsg != "success":
        return upload_image_db_error_json

    return upload_image_success_json
Esempio n. 4
0
def uploadImageJSON(username, blob, filename, token, secret, tags):
    oauth_verify_code = verifyOauth(token, secret)
    if oauth_verify_code != 200:
        return oauth_error_json
        
    rtnBlobList = uploadBlob(username, blob, filename)
    if len(rtnBlobList) < 2:
        return upload_image_blob_error_json


    rtnDocumentdbMsg = makeMetadata(username, filename, tags, rtnBlobList[0], rtnBlobList[1])  
    if rtnDocumentdbMsg  != "success":
        return upload_image_db_error_json
        
    return upload_image_success_json