A simple, but not stupid, ipfs uploader for akkoma. Bundled as a module.
Find a file
2022-08-18 17:26:45 +02:00
lib/pleroma translated ipfs as module for Akkoma 2022-08-18 17:26:45 +02:00
test/pleroma/uploaders translated ipfs as module for Akkoma 2022-08-18 17:26:45 +02:00
.gitignore translated ipfs as module for Akkoma 2022-08-18 17:26:45 +02:00
LICENSE translated ipfs as module for Akkoma 2022-08-18 17:26:45 +02:00
README.md translated ipfs as module for Akkoma 2022-08-18 17:26:45 +02:00

Akkoma module for IPFS as uploader

Important

This module replace the upload.ex file to implement the IPFS uploader, this because Elixir doesn't implement Monkey Patching and without the modified upload.ex Akkom won't return the right base url back.

Installation

  • Enter in the module folder of akkoma (defined in the config.exs)
  • Clone this repo inside (only the .ex files will be loaded)

Cheatsheet

  • post_gateway_url: URL with port of POST Gateway (unauthenticated)
  • get_gateway_url: URL of public GET Gateway

Example

config

config :pleroma, :modules, runtime_dir: "instance/modules"

config :pleroma, Pleroma.Uploaders.IPFS,
  post_gateway_url: "http://localhost:5001",
  get_gateway_url: "http://{CID}.ipfs.mydomain.com"
  
config :pleroma, Pleroma.Upload,
  uploader: Pleroma.Uploaders.IPFS