Files
CloudFlare-ImgBed/README_en.md
2025-06-14 22:58:38 +08:00

16 KiB
Raw Blame History

logo

🗂️Open-source file hosting solution based on Cloudflare Pages, supporting multiple storage channels such as Telegram Bot, Cloudflare R2, S3, etc.

简体中文|English


Important

Please check the announcement for upgrade notes on version 2.0!

🚀Project Website: CloudFlare ImgBed

Announcement

Pinned

  1. If you encounter issues during deployment or usage, please carefully read the documentation, FAQ, and existing issues first.
  2. Frontend repository: MarSeventh/Sanyue-ImgHub
  3. Note: This repository is a remake of the Telegraph-Image project. If you like this project, please support the original one as well.

2025.2.6 Version 2.0 Upgrade Notes

The v2.0 beta version has been released, with many changes and optimizations compared to v1.0. However, the beta version may have potential instability. If you prefer stability, you may delay updating.

Due to changes in the build command, this update requires manual operation. Please follow these steps:

  • Sync your forked repository to the latest version (ignore if already synced automatically)
  • Go to the Pages management page, enter Settings -> Build, edit the Build configuration, and set the Build command to npm install image-20250212190315179
  • All new version settings have been migrated to the Admin Panel -> System Settings interface, so generally no need to configure environment variables anymore. Settings made in the system settings interface will override environment variable settings. However, to ensure compatibility of images uploaded via the Telegram channel with the old version, please keep any previously set Telegram-related environment variables!
  • After confirming the above settings are correct, go to the Pages management page, enter Deployments, and Retry the last failed deployment.

Notification About Switching to Telegram Channel

Due to abuse of the telegraph image hosting, the upload channel has switched to Telegram Channel. Please update to the latest version (see the last section of chapter 3.1 for update instructions) and set TG_BOT_TOKEN and TG_CHAT_ID according to the deployment requirements in the documentation, otherwise upload functionality will not work.

Also, the KV database is now mandatory; if not configured before, please configure it as per the documentation.

For issues, please check section 5 FAQ first.

Ecosystem

1. Plugins

2. Repositories

Experience Links and Quality Blogs/Videos (Good for learning deployment or usage issues)

Experience site: CloudFlare ImgBed

Access code: cfbed

Experience video: CloudFlare Free Image Hosting, easily protect your every wonderful moment! _ Bilibili

Related tutorial videos:

Related quality blogs (Thanks to every supportive contributor):

Recent Updates

Add Features:

  • Beautify error images
  • Upload page supports preview of ico and more formats

Update log: https://cfbed.sanyue.de/guide/update-log.html

1. Introduction

Free file hosting solution with full lifecycle features including upload, management, read, and delete, supporting authentication, directories, image moderation, random images, and other features.

CloudFlare

2. Features

3. Deployment

4. Show

image-20250313204101984

image-20250313204138886

Other page screenshots

image-20250313204308225

image-20250314152355339

image-20250313204325002

5. TODO

5.1 Add Features 💕

Feature update list
  1. Add paste image upload feature (completed 2024.7.22)
  2. Add markdown, html format link copy (completed 2024.7.21)
  3. Add admin panel entry on upload page (completed 2024.7.21)
  4. 📝 Add user customization interface
    • Custom login and upload page backgrounds (completed 2024.8.25)
    • Custom image hosting name and logo (completed 2024.8.26)
    • Custom website title and icon (completed 2024.8.26)
    • Custom background switch interval (completed 2024.9.11)
    • Custom background opacity (completed 2024.9.12)
    • Custom footer portal (completed 2024.10.20)
    • Global custom link prefix (completed 2024.12.27)
    • Footer hide option (completed 2025.2.4)
  5. Add random image API (completed 2024.7.25)
  6. Improve multi-format link display, add UBB support (completed 2024.8.21)
  7. Improve login logic, add backend auth code verification (completed 2024.8.21)
  8. Support URL paste upload (completed 2024.8.23)
  9. Auto compress images >5MB before upload (completed 2024.8.26)
  10. Restyle upload page toolbar, support custom compression (completed 2024.9.28)
  11. Refactor admin, add authentication and display optimization, add image detail page (completed 2024.12.20)
  12. Add visit statistics, IP record, IP blacklist, upload IP blacklist in admin (upload IP blacklist done, visit record postponed)
  13. Auto copy link on upload page click (completed 2024.9.27)
  14. Upload settings memory (method, link format) (completed 2024.9.27, merged upload methods)
  15. No password set, no redirect to login (completed 2024.9.27)
  16. Add delete only successful uploads, retry failed uploads (completed 2024.9.28)
  17. Optimize file naming on paste upload (completed 2024.9.26)
  18. Add R2 bucket support (completed 2024.11.5)
  19. Add batch blacklist and whitelist in admin (completed 2024.12.14)
  20. Telegram Channel upload records bot and channel data for migration/backup (completed 2024.12.4)
  21. Support custom naming methods (completed 2024.12.4)
  22. Support auto retry with other channels on upload failure (completed 2024.12.12)
  23. Backend list API pagination (completed 2024.2.5)
  24. Support custom link prefix (completed 2024.12.4)
  25. 📝 Integrate alist or implement webdav (under evaluation)
  26. Add file size record in details (completed 2024.12.10)
  27. Support admin custom global default link prefix (completed 2025.2.1)
  28. Open more file formats (completed 2024.12.9)
  29. Auto clear CF CDN cache on delete, whitelist, blacklist (completed 2024.12.11)
  30. Admin batch selection remembers user order (completed 2024.12.20)
  31. 📝 Support custom upload path and album feature
    • Folder delete (completed 2025.3.6)
    • File move (completed 2025.3.7)
    • Fix ghost click bug on admin load more (completed 2025.3.6)
    • Batch operations support folders (completed 2025.3.6)
    • Admin pagination logic adjustment (completed 2025.3.6)
  32. Support multiple Telegram Bot Token load balancing (completed 2025.2.4)
  33. Admin provides detailed setting info and guidance (completed 2025.2.5)
  34. Logo redesign, login page optimization, setting tooltips (completed 2025.2.2)
  35. Add S3 API channel (completed 2024.2.3)
  36. Support short link naming (completed 2025.2.1)
  37. Support dark mode (completed 2025.1.11)
  38. Support KV backup and restore
  39. Footer can be hidden (completed 2025.2.4)
  40. Search function enhancement
  41. Support pasting multiple links and external link management
  42. Upload file MD5 record and hard link support
  43. Upload page recent uploads display
  44. Configure upload page default settings from admin
  45. Add announcement feature
  46. Support width/height params on image access
  47. Support image format conversion on upload

5.2 Fix Bugs 👻

Bug fix list
  1. Fix API upload not showing in backend (fixed 2024.7.25)
  2. Migrate upload to TG channel due to telegra.ph closure (fixed 2024.9.7)
  3. Fix infinite refresh when no admin auth set (fixed 2024.9.9)
  4. Fix some videos not previewing (likely file issue)
  5. Add new image moderation channel
  6. R2 channel deletes bucket synchronously in admin (fixed 2024.12.4)
  7. Add CORS header access-control-allow-origin: * in file response (fixed 2024.12.9)
  8. Add upload page access restriction whitelist (fixed 2024.12.11)
  9. Fix long file names covering buttons
  10. Fix list API data completeness

6. Q&A

7. Tips

  • Frontend is open source, see MarSeventh/Sanyue-ImgHub.

  • Sponsor: Maintaining the project is not easy. If you like it, please support the author. Your support is the motivation to keep going~

  • Sponsors: Thanks to the following sponsors for supporting this project!

  • Contributors: Thanks to the following contributors for their selfless contributions!

    Contributors

8. Star History

If you like the project, please give a free star, thank you very much!

Star History Chart

9. Special Sponsors

  • AsiaYun: Provides cloud computing resources support (high defense servers | Fuzhou high defense | Guangdong Telecom | Hong Kong servers | US servers | Overseas servers)

  • DartNode: Provides cloud computing resources support

Powered by DartNode