lundi 9 novembre 2015

AWS-SDK - making sure file paths are unique

I have a Project model which has_many :attachments.

In the attachment model I have the following code:

has_attached_file :document, default_url: "",
  storage: :s3,
  s3_credentials: {
    access_key_id: "...",
    secret_access_key: "..."
  },
  bucket: "projects",
  path: ":id/:filename"

Is path: ":id/:filename" enough to create a uniqe path? I can't find what options are available for path.

Aucun commentaire:

Enregistrer un commentaire