Skip to content

Adds EuroScope file management API endpoints - #31

Merged
AussieScorcher merged 1 commit into
mainfrom
feat-es-cdn
Jul 23, 2025
Merged

Adds EuroScope file management API endpoints#31
AussieScorcher merged 1 commit into
mainfrom
feat-es-cdn

Conversation

@AussieScorcher

Copy link
Copy Markdown
Member

This pull request introduces new EuroScope endpoints for managing and retrieving files associated with specific ICAO codes. The changes include adding routes for listing, uploading, and deleting files, with robust validation and user authentication mechanisms.

New EuroScope Endpoints:

  • Added a GET endpoint (/euroscope/files/:icao) to list public files for a given ICAO code. This includes validation of the ICAO format and response formatting for client ease of use.

  • Added a POST endpoint (/euroscope/upload) to upload files to ICAO-specific folders. This includes file validation (type, size, and ICAO format), user access checks, and a limit of 2 files per ICAO.

  • Added a DELETE endpoint (/euroscope/files/:icao/:filename) to delete specific files. This includes user access checks and validation of the ICAO format.

Middleware and Authentication:

  • Introduced middleware to authenticate users for EuroScope endpoints using a VATSIM token and validate access permissions.

These changes enhance the application's functionality for managing ICAO-related files while ensuring security and proper access control.

Implements comprehensive file management system for EuroScope with ICAO-based organization. Provides public file listing endpoint for retrieving files by airport code and authenticated endpoints for upload/delete operations.

Includes access control integration with division system to ensure users can only manage files for airports they have permission to access. Enforces file size limits and restricts each ICAO to maximum 2 files to prevent storage abuse.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive file management API for EuroScope with ICAO-specific file organization. The implementation adds endpoints for listing, uploading, and deleting files with proper authentication and access control mechanisms.

  • Adds public file listing endpoint for retrieving files by ICAO code
  • Implements authenticated file upload with size limits and ICAO access validation
  • Provides file deletion capabilities with proper authorization checks

@stopbars stopbars deleted a comment from Copilot AI Jul 23, 2025
@stopbars stopbars deleted a comment from Copilot AI Jul 23, 2025
@stopbars stopbars deleted a comment from Copilot AI Jul 23, 2025
@stopbars stopbars deleted a comment from Copilot AI Jul 23, 2025
@stopbars stopbars deleted a comment from Copilot AI Jul 23, 2025

@llamavert llamavert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job :)

@AussieScorcher
AussieScorcher merged commit 7afaff7 into main Jul 23, 2025
4 checks passed
@AussieScorcher
AussieScorcher deleted the feat-es-cdn branch August 6, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants