Upload from base64 string

Upload from base64 string#

...

Example of base64 string image#

iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABX9AAAV/QHNcFFhAAAAFHRFWHRDcmVhdGlvbiBUaW1lADYvMy8xOAVyVNMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAMNklEQVR4nO3dMWhc14LHYWVZYTESjAoLad1MwAOOG0/AIV5wVikeSJ0DcS93KZ7ZLVzE1ds+LtS5SWfBbrEgw7p6MoQQ7bqQWUPGjZ9hDJnGmcEqNGAL+6nIFgMm2LpjRZ47o7/1feV4PPdiwi/n3nvuOR/9+NsEQIR/GPcJAByUYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCC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Jwdf+r3hA6jVhGDBiC1ffbhQ723cPHfAJd77Q6c/1Ka3ff51a8CN/yCCBaPWWG7XGs/eeXd8KKrzu8tXH4Y+E3ybYMEYzC7srqxuNjdqBx9qHcLnX7e+vPIo/TLw9wQLxqax3D5z8enWen1rvT7cbDWW2otXHsW9efNOggXjNDWz9+WVRxcutx7fO7W1Xj/Iw74BqvO7jeV2YznvJcEDEiwYv6mZvX5odjqVx/dOtZtzv/x88uBjrlpju9Z4dubi06C1Qw/nox9/G/cpAPvZ6VR63elOq9p/a6fXqex0p6dm9l5vyfPxp9snpv/+wUfq9wQLiOHlZyCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC

cURL one liner#

Upload that file (simple example)

curl -X POST "https://subdomain.api.airstore.io/v1/upload" \
    -H 'Content-Type: application/json' \
    -H 'X-Airstore-Secret-Key: 00000000111122223333444444444444' \
    --data '{"name": "new_image_from_base64.png",
       "data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABX9AAAV/QHNcFFhAAAAFHRFWHRDcmVhdGlvbiBUaW1lADYvMy8xOAVyVNMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAMNklEQVR4nO3dMWhc14LHYWVZYTESjAoLad1MwAOOG0/AIV5wVikeSJ0DcS93KZ7ZLVzE1ds+LtS5SWfBbrEgw7p6MoQQ7bqQWUPGjZ9hDJnGmcEqNGAL+6nIFgMm2LpjRZ47o7/1feV4PPdiwi/n3nvuOR/9+NsEQIR/GPcJAByUYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADM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EEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC",
       "postactions": "decode_base64"
    }
}'

You should see a response like this

{
    "status": "success",
    "file": {
        "size": 3291,
        "meta": {},
        "properties": {},
        "type": "image/png",
        "name": "new_image_from_base64.png",
        "uuid": "7f6a624b-03bc-5560-b61d-a81766143375",
        "url_permalink": "https://example.api.airstore.io/v1/get/_/7f6a624b-03bc-5560-b61d-a81766143375/new_image_from_base64.png",
        "url_public": "https://example.airstore.io/folder/new_image_from_base64.png"
    },
    "info": {
        "company_uuid": "7062f363-39f8-423d-b150-6de2c89b8027",
        "files_count": 0,
        "trace": "6ASFDRYaelastic604-scal3fl3x8n",
        "uploaded_files": 1,
        "version": "c3005f8",
        "project_uuid": "fd2e3b67-d412-4e2c-b234-dbf8a48f279e",
        "input_info": {
            "name": "new_image_from_base64.png",
            "data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3...hADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC",
            "postactions": "decode_base64"
        }
    }
}