🚀 Flask web application for managing BiznetGio NEO Object Storage with S3-compatible API. Upload, view, and delete files with ease. Features SSL handling, auto bucket creation, and responsive UI. https://neobject.classy.id
Go to file
andri 6206c2be0d Update README.md 2025-09-15 05:14:53 +00:00
templates Upload files to "templates" 2025-09-15 03:56:19 +00:00
.env.example Add .env.example 2025-09-15 03:58:36 +00:00
README.md Update README.md 2025-09-15 05:14:53 +00:00
app.py Upload files to "/" 2025-09-15 03:57:04 +00:00
php_neo_wrapper.php Add php_neo_wrapper.php 2025-09-15 04:33:48 +00:00
pure_php_neo.php Add pure_php_neo.php 2025-09-15 04:34:25 +00:00
requirements.txt Update requirements.txt 2025-09-15 03:57:19 +00:00

README.md

Flask NEO Object Storage Manager

🚀 A modern Flask web application for managing BiznetGio NEO Object Storage with S3-compatible API.

Python Flask License

Features

  • 📁 File Upload & Management - Upload files with drag & drop support
  • 🖼️ Image Preview - Preview uploaded images directly in browser
  • 🗑️ File Deletion - Delete files with confirmation
  • 🔗 Direct Links - Copy direct URLs to clipboard
  • 🛡️ SSL Handling - Automatic SSL certificate handling for development
  • 🪣 Auto Bucket Creation - Automatically creates buckets if they don't exist
  • 📱 Responsive UI - Bootstrap-based responsive interface
  • 🔧 Easy Configuration - Environment variable based setup

🚀 Quick Start

Prerequisites

  • Python 3.8+
  • BiznetGio NEO Object Storage account
  • Access Key & Secret Key from NEO Portal

Installation

  1. Clone the repository

    git clone https://git.classy.id/andri/flask-neo-object-storage.git
    cd flask-neo-object-storage
    
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Configure environment variables

    cp .env.example .env
    # Edit .env with your NEO credentials
    
  5. Run the application

    python app.py
    
  6. Open browser

    http://localhost:7600
    

⚙️ Configuration

Create a .env file with your NEO Object Storage credentials:

NEO_ACCESS_KEY=your_access_key_here
NEO_SECRET_KEY=your_secret_key_here
NEO_ENDPOINT=https://nos.wjv-1.neo.id
NEO_BUCKET=my-unique-bucket-name
NEO_USE_SSL=false

Getting NEO Credentials

  1. Login to BiznetGio Portal
  2. Navigate to NEO Object Storage
  3. Create a new bucket or use existing one
  4. Copy your Access Key and Secret Key

📁 Project Structure

flask-neo-object-storage/
├── app.py                 # Main Flask application
├── requirements.txt       # Python dependencies
├── .env.example          # Environment variables template
├── .env                  # Your environment variables (gitignored)
├── templates/            # HTML templates
│   ├── base.html
│   ├── index.html
│   ├── upload.html
│   └── files.html
└── README.md

🛠️ API Endpoints

Method Endpoint Description
GET / Home page
GET/POST /upload Upload files
GET /files View all files
POST /api/upload AJAX file upload
POST /api/delete Delete file
GET /api/files List files JSON
GET /test-connection Test NEO connection
GET /setup-bucket Create bucket

🐛 Troubleshooting

SSL Certificate Issues

If you encounter SSL certificate errors:

NEO_USE_SSL=false
NEO_ENDPOINT=http://nos.wjv-1.neo.id

Bucket Not Found Error

  1. Make sure bucket name is unique globally
  2. Create bucket manually in NEO Portal
  3. Use /setup-bucket endpoint to auto-create

Access Denied Error

  1. Verify your Access Key and Secret Key
  2. Check bucket permissions in NEO Portal
  3. Ensure bucket policy allows public read

🚀 Deployment

Production Deployment

  1. Use production WSGI server

    pip install gunicorn
    gunicorn -w 4 -b 0.0.0.0:8000 app:app
    
  2. Enable SSL in production

    NEO_USE_SSL=true
    
  3. Use reverse proxy (Nginx)

    server {
        listen 80;
        server_name yourdomain.com;
    
        location / {
            proxy_pass http://127.0.0.1:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }
    

Docker Deployment

FROM python:3.9-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
EXPOSE 7600

CMD ["python", "app.py"]

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

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

🙏 Acknowledgments

📞 Support


Made with ❤️ in Indonesia

Dengan setup ini, kamu bisa menggunakan Flask app sebagai microservice untuk handle object storage, sementara aplikasi utama tetap menggunakan PHP!