def monochrome_and_upload()

in sample-demo-app/aws_python_sample_application/image_processor.py [0:0]


        def monochrome_and_upload(self, source_image):
            image_name = source_image.split(".")[-2]
            target_file_path = source_image + "-monochrome.png"

            try:
                ImageEditor.monochrome(source_image, target_file_path)
                self._upload_file(target_file_path, self.s3_bucket_name,
                                  BW_FOLDER + image_name + "-monochrome-" + str(
                                      int(round(time.time() * 1000))) + ".png")
            except Exception:
                raise
            finally:
                delete_file(target_file_path)