2013-09-27 119 views
0

我想上傳圖像/視頻/ ...到我的亞馬遜S3桶。我正在使用Transloadit上傳我的文件。上傳作品,但我的圖像存儲這樣的:路徑圖像+文件上傳到亞馬遜s3與transloadit

圖像/ EF/c3f8aa22f70265d8c12c799df0bbed/image.jpg的

我只是想有 「image.jpg的」 在我的/ images文件夾。 我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", 
       } 
      } 
     } 
    }); 

任何人都知道我該怎麼辦呢?在存儲片段

回答

2

添加路徑:

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", 
      }