ci/woodpecker/pr/woodpecker Pipeline is pendingDetails
We got a path and there's a "base_url" function. With that the url was
build. But not all url's are nessecarely build like this. Building the
url should be the responsability of the Uploader itself, so it's now
moved to there.
ci/woodpecker/pr/woodpecker Pipeline is pendingDetails
To move more logic to the Uploader modules, it's better to keep the same
`upload` and manipulate that while going through the upload pipeline, so
that's how it's now done.
Since we expect the `upload`, I removed the option for returning just `:ok`
from the uploaders.
It was possible to bypass the logic in the `get_url` function, but that was
unused. Since it makes even less sense when returning `upload`, I removed that
In a later stage I want to return the url from the uploader module, which
should obsolete this function.
I saw a warning from `Pleroma.Upload.Filter.MogrifyTest` which I now fixed.
ci/woodpecker/pr/woodpecker Pipeline is pendingDetails
It was possible to get the uploader from opts.
But during the upload flow, a function was called who didn't use opts and just got it from settings.
This is inconsistent.
In practice, providing the uploader through opts was never used, so I removed it and now we always get it from settings.
ci/woodpecker/pr/woodpecker Pipeline is pendingDetails
To get the url and base url, we had a function in upload.ex.
This included a `case` to check on what module is used.
This means that adding a new upload module implies changing code besides just adding a new module.
Here we try to get the logic properly into the respective modules.
This doesn't add new functionality, but should make it easier to add new uploaders in the future.