1

我想将图像/视频/...上传到我的 amazon s3 存储桶。我正在使用Transloadit上传我的文件。上传有效,但我的图像存储如下:

图片/ef/c3f8aa22f70265d8c12c799df0bbed/image.jpg

我只想在我的 /images 文件夹中有“image.jpg”。我的 Transloadit 代码:

$('form#MyForm').transloadit({
        wait: true,
        triggerUploadOnFileSelection: true,
        params: {
            auth: { key: "myapikey" },
            steps: {
                resize_to_125: {
                    robot: "/image/resize",
                    use: ":original",
                    width: 750,
                    height: 750
                },
                store: {
                    robot: "/s3/store",
                    key: "myket",
                    secret: "mysecretkey",
                    bucket: "mybucket/images",
                }
            }
        }
    });

有人知道我该怎么做吗?

4

1 回答 1

3

在商店段中添加路径:

 steps: {
            resize_to_125: {
                robot: "/image/resize",
                use: ":original",
                width: 750,
                height: 750
            },

 store: {
                robot: "/s3/store",
                key: "myket",
                secret: "mysecretkey",
                bucket: "mybucket",
                path: "images/image.jpg",
            }
于 2013-09-30T14:49:22.410 回答