'Upload an image of the user\'s face. `img_data` should be a raw
bytestream of a PNG image. This method will take the data, encrypt it
using our FACE_IMAGE_AES_KEY, encode it with base64 and save it to the
storage backend.
Yes, encoding it to base64 adds compute and disk usage without much real
benefit, but that\'s what the other end of this API is expecting to get.'

@status_before_must_be('created')
def upload_face_image(self, img_data):

    if settings.FEATURES.get('AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'):
        return
    aes_key_str = settings.VERIFY_STUDENT['SOFTWARE_SECURE']['FACE_IMAGE_AES_KEY']
    aes_key = aes_key_str.decode('hex')
    path = self._get_path('face')
    buff = ContentFile(encrypt_and_encode(img_data, aes_key))
    self._storage.save(path, buff)
