SferaDoc.Pdf.ObjectStore.Azure (sfera_doc v0.1.0)

Copy Markdown View Source

Azure Blob Storage PDF object store.

Requires the optional dependency :azurex.

Configuration

config :sfera_doc, :pdf_object_store,
  adapter: SferaDoc.Pdf.ObjectStore.Azure,
  container: "my-pdfs",
  prefix: "sfera_doc/"   # optional, default ""

Credentials must be configured via the azurex global configuration:

config :azurex, Azurex.Blob.Config,
  storage_account_name: "mystorageaccount",
  storage_account_key: "base64encodedkey=="

For local development with Azurite, configure the API URL:

config :azurex, Azurex.Blob.Config,
  storage_account_name: "devstoreaccount1",
  storage_account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",
  api_url: "http://127.0.0.1:10000/devstoreaccount1"

Blob name format

{prefix}{name}/{version}/{assigns_hash}.pdf