Exemple #1
0
    def album_zip(self):
        if "hash" not in request.form:
            return {"error": 415}, 415

        h = request.form["hash"]
        klass = RedisObject.klass(h)
        if not klass or klass is not Album:
            return {"error": 404}, 404

        if os.path.exists(file_storage(h) + ".zip"):
            return {"status": "done"}

        zip_album.delay(h)

        return {"status": "success"}
Exemple #2
0
    def album_zip(self):
        if "hash" not in request.form:
            return {"error": 415}, 415

        h = request.form["hash"]
        klass = RedisObject.klass(h)
        if not klass or klass is not Album:
            return {"error": 404}, 404

        if os.path.exists(file_storage(h) + ".zip"):
            return {"status": "done"}

        zip_album.delay(h)

        return {"status": "success"}