Make dedupe return correct filenames and enable it by default
The only thing preventing dedupe from being enabled by default is that it messes with the filenames. The solution would be to put a Content-Disposition header with the desired filename.
However with dedupe one attachment can be tied to multiple posts, the solution would be to make pleroma-fe add a name
url parameter in the query string. For example if the backend returns
{
"description": "cofe.gif",
"id": "1765902618",
"preview_url": "https://patch.cx/media/fa82492fa0748bc2eefe2094fe8d307f77729252a4cc8eacd0673271e7c72e64.gif",
"remote_url": "https://patch.cx/media/fa82492fa0748bc2eefe2094fe8d307f77729252a4cc8eacd0673271e7c72e64.gif",
"text_url": "https://patch.cx/media/fa82492fa0748bc2eefe2094fe8d307f77729252a4cc8eacd0673271e7c72e64.gif",
"type": "image",
"url": "https://patch.cx/media/fa82492fa0748bc2eefe2094fe8d307f77729252a4cc8eacd0673271e7c72e64.gif"
}
the frontend should link the attachment as https://patch.cx/media/fa82492fa0748bc2eefe2094fe8d307f77729252a4cc8eacd0673271e7c72e64.gif?name=cofe.gif
not sure that's the best approach to this so, cc: @lambadalambda @shpuld
Edited by rinpatch