IRC: File share¶
If you want to share an image or a file on IRC you need to upload it to a file host. There plenty of free services around, like https://x0.at/ that are easy to use from a web browser or integrate with some IRC clients. If you want to self host your file share you can do that on Blinkenshell with a Supporter account (PHP is required).
Self hosting¶
The author of x0.at also provides the source code of his simple upload script: https://github.com/Rouji/single_php_filehost
Download the index.php file from the repository and save it in ~/public_html/upload/ for example:
cd ~/public_html
mkdir upload
wget https://raw.githubusercontent.com/Rouji/single_php_filehost/refs/heads/master/index.php
For password protection add a .htaccess file, vim ~/public_html/upload/.htaccess enter:
AuthName "single_php_filehost"
AuthType Basic
AuthUserFile /home/<username>/.htpasswd.upload
Require valid-user
And add a user to the .htpasswd file: htpasswd -c /home/<username>/.htpasswd.upload <username>
If you want to add more users, remove the -c option to htpasswd or file will be recreated.
Weechat Android¶
Go to settings -> File sharing
At the upload URL enter path of upload service , if you host yourself with single_php_filehost for example you can use something like: https://me.u.blinkenshell.org/upload/
If you added a .htaccess password protection, add Authentication: Basic and then User and Password under advanced options.
Now you can directly upload files from weechat android client and it will paste the link in the chat.