rzane / file_store

🗄️ A unified interface for file storage backends
MIT License
19 stars 3 forks source link

Fix an error in FileStore.Adapters.S3.write/3 #6

Closed halostatue closed 4 years ago

halostatue commented 4 years ago

The callback specification for FileStore.Adapter.write/3 is:

  @callback write(store, key, iodata) :: :ok | {:error, term}

However, ExAws.S3.put_object/2 only supports binary. To ensure that this doesn't break, call IO.iodata_to_binary(content) immediately on calling ExAws.S3.put_object/2 in FileStore.Adapters.S3.write/3.