keystone-storage-adapter-s3 icon indicating copy to clipboard operation
keystone-storage-adapter-s3 copied to clipboard

Dynamic path

Open IbrahimTareq opened this issue 5 years ago • 1 comments

I'm trying to assign unique paths for each object that's saved. Is there a way we can assign a dynamic path (perhaps based on the id of the object via callback) and then save that?

cover_image: {
      label: "Cover Image",
      type: Types.File,
      storage: s3Storage(returnsId),
      filename: function (item, file) {
          return encodeURI(item._id + '-' + item.name);
      }
}

IbrahimTareq avatar May 12 '19 02:05 IbrahimTareq

same here including with localFileAdapter, any news on the subject?¿

ElusiveByte avatar Jun 01 '20 17:06 ElusiveByte