keystonejs / keystone-storage-adapter-s3

⚠️ Archived - Legacy S3 Storage Adapter for KeystoneJS
MIT License
17 stars 55 forks source link

Dynamic path #43

Open IbrahimTareq opened 5 years ago

IbrahimTareq commented 5 years ago

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);
      }
}
ElusiveByte commented 4 years ago

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