A Toolforge web application that helps Wikimedia contributors seamlessly transfer media files across Wikimedia projects using MediaWiki APIs and OAuth authentication.
Wikifile Transfer is a Toolforge web application maintained by Indic TechCom. It allows Wikimedia contributors to transfer media files (images, documents, etc.) between different Wikimedia projects (e.g., from English Wikipedia to Commons, or between language wikis) without manual downloading and re-uploading.
Live Tool: https://wikifile-transfer.toolforge.org
Issue Tracker: https://phabricator.wikimedia.org/tag/indic-techcom/
Discussion: https://meta.wikimedia.org/wiki/Talk:Indic-TechCom/Tools/Wikifile-transfer
Before setting up, ensure you have the following installed:
| Requirement | Version | Notes |
|---|---|---|
| Python | 3.10+ | Backend runtime |
| Node.js + npm | 18+ | Frontend build |
| Redis | Any stable | Task broker |
| MySQL / MariaDB | Any stable | Production DB (SQLite for prototyping) |
| Docker + Compose | Latest | Optional but recommended |
| Wikimedia OAuth | — | Consumer key/secret from Special:OAuthConsumerRegistration |
Copy the example config and fill in your values:
cp config.yaml.bak config.yamlThen edit config.yaml:
ENV: dev # Use 'dev' locally, 'prod' on Toolforge
SECRET_KEY: your-secret-key # Any random string for Flask sessions
CONSUMER_KEY: <wikimedia-consumer-key>
CONSUMER_SECRET: <wikimedia-consumer-secret>
OAUTH_MWURI: https://meta.wikimedia.org/w
SESSION_COOKIE_SECURE: True
SESSION_REFRESH_EACH_REQUEST: False
PREFERRED_URL_SCHEME: https
SQLALCHEMY_DATABASE_URI: mysql+pymysql://user:pass@host/dbname
SQLALCHEMY_TRACK_MODIFICATIONS: False
⚠️ Never commitconfig.yamlto version control. It is already listed in.gitignore.
Also ensure the temp_images/ directory exists and is writable:
mkdir -p temp_images && chmod 755 temp_imagesFollow these steps to run the project locally without Docker:
git clone https://github.com/indictechcom/wikifile-transfer.git
cd wikifile-transferpython3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txtcp config.yaml.bak config.yaml
# Edit config.yaml with your OAuth credentials and DB URIflask db init # Only required the very first time
flask db migrate -m "initial migration"
flask db upgraderedis-server # Or use Docker: docker run -p 6379:6379 rediscelery -A celeryWorker.app worker --loglevel=infopython app.pyBackend will be available at http://localhost:5001
Open a new terminal:
cd frontend
npm install
npm startFrontend will be available at http://localhost:3000
The easiest way to get the full stack running locally:
docker-compose up --buildThis spins up three services:
| Service | URL |
|---|---|
| Flask backend | http://localhost:5001 |
| React frontend | http://localhost:3000 |
| Redis | localhost:6379 |
To stop all services:
docker-compose downWe welcome contributions from the community! Please read CONTRIBUTING.md for guidelines on:
- Setting up your development environment
- Submitting pull requests
- Reporting bugs and requesting features
- Coding conventions and branch naming
Bug reports & feature requests: Phabricator
Discussion: Meta-Wiki Talk Page
Code contributions: Fork this repo and open a pull request against master
MIT License