Exemplo n.º 1
0
      def topic(self):
        self.conn = S3Connection()
        self.conn.create_bucket(s3_bucket)

        config=Config(STORAGE_BUCKET=s3_bucket, STORES_CRYPTO_KEY_FOR_EACH_IMAGE=True)
        storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
        return storage.get_crypto(IMAGE_URL % '9999')
Exemplo n.º 2
0
    def topic(self):
      self.conn = S3Connection()
      self.conn.create_bucket(s3_bucket)

      config=Config(STORAGE_BUCKET=s3_bucket)
      storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
      return storage.exists(IMAGE_URL % '9999')
Exemplo n.º 3
0
    def topic(self):
      self.conn = S3Connection()
      self.conn.create_bucket(s3_bucket)

      config=Config(STORAGE_BUCKET=s3_bucket)
      storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
      return storage.resolve_original_photo_path("toto")
Exemplo n.º 4
0
    def topic(self):
      self.conn = S3Connection()
      bucket = self.conn.create_bucket(s3_bucket)

      thumborId = IMAGE_URL % '1'
      config=Config(STORAGE_BUCKET=s3_bucket)
      storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
      store = storage.put(thumborId, IMAGE_BYTES )
      k = Key(bucket)
      k.key = thumborId
      result = k.get_contents_as_string()
      return (store , result)
Exemplo n.º 5
0
    def topic(self):
      self.conn = S3Connection()
      self.conn.create_bucket(s3_bucket)

      config=Config(STORAGE_BUCKET=s3_bucket)
      storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
      storage.put(IMAGE_URL % '5', IMAGE_BYTES)
      storage.remove(IMAGE_URL % '5')
      time.sleep(1)
      created = storage.exists(IMAGE_URL % '5')
      time.sleep(1)
      storage.put(IMAGE_URL % '5', IMAGE_BYTES)
      return storage.exists(IMAGE_URL % '5') != created
Exemplo n.º 6
0
      def topic(self):
        self.conn = S3Connection()
        self.conn.create_bucket(s3_bucket)

        config=Config(STORAGE_BUCKET=s3_bucket)
        storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
        storage.put(IMAGE_URL % '7', IMAGE_BYTES)
        storage.put_detector_data(IMAGE_URL % '7', 'some-data')
        return storage.get_detector_data(IMAGE_URL % '7')
Exemplo n.º 7
0
      def topic(self):
        self.conn = S3Connection()
        self.conn.create_bucket(s3_bucket)

        config=Config(STORAGE_BUCKET=s3_bucket)
        storage = Storage(Context(config=config, server=get_server('ACME-SEC')))
        storage.put(IMAGE_URL % '9998', IMAGE_BYTES)
        storage.put_crypto(IMAGE_URL % '9998')
        return storage.get_crypto(IMAGE_URL % '9998')