Skip to content

Release 251206#199

Merged
Yukaii merged 5 commits intoproductionfrom
master
Dec 5, 2025
Merged

Release 251206#199
Yukaii merged 5 commits intoproductionfrom
master

Conversation

@Yukaii
Copy link
Contributor

@Yukaii Yukaii commented Dec 5, 2025

Bring back the image upload

Copilot AI review requested due to automatic review settings December 5, 2025 16:59
@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for disfactory-frontend ready!

Name Link
🔨 Latest commit 4f87093
🔍 Latest deploy log https://app.netlify.com/projects/disfactory-frontend/deploys/69330f8bd0111a00087119dd
😎 Deploy Preview https://deploy-preview-199--disfactory-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Copilot AI left a comment

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 restores the image upload functionality after a period of maintenance by introducing a configurable image upload provider system that supports both Imgur and backend filesystem uploads.

  • Removes maintenance warnings and modal that blocked image uploads
  • Adds configurable image upload provider (Imgur vs backend) with environment variables
  • Updates CI/CD workflows to use backend upload provider for staging and production environments

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/ImageUploadForm.vue Removes the warning alert that informed users about image upload limitations
src/api/index.ts Adds upload provider abstraction with uploadToBackend function and configuration for selecting between Imgur and backend uploads
src/App.vue Removes MaintenanceModal component, related state, and dismiss handler that displayed maintenance notice
.github/workflows/ci.yml Configures environment variables for backend upload provider in staging and production deployment workflows
.env.example Adds documentation and example values for new image upload configuration variables

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// Image upload provider configuration
type ImageUploadProvider = 'imgur' | 'backend'
const IMAGE_UPLOAD_PROVIDER: ImageUploadProvider = (process.env.VUE_APP_IMAGE_UPLOAD_PROVIDER as ImageUploadProvider) || 'imgur'
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The environment variable VUE_APP_IMAGE_UPLOAD_PROVIDER is cast to ImageUploadProvider type without validation. If someone sets an invalid value (e.g., 'aws' or 'cloudinary'), TypeScript will not catch this at runtime, and the code will silently fall back to 'imgur'. Consider adding runtime validation:

const rawProvider = process.env.VUE_APP_IMAGE_UPLOAD_PROVIDER
if (rawProvider && rawProvider !== 'imgur' && rawProvider !== 'backend') {
  console.warn(`Invalid IMAGE_UPLOAD_PROVIDER: ${rawProvider}. Falling back to 'imgur'`)
}
const IMAGE_UPLOAD_PROVIDER: ImageUploadProvider = (rawProvider as ImageUploadProvider) || 'imgur'
Suggested change
const IMAGE_UPLOAD_PROVIDER: ImageUploadProvider = (process.env.VUE_APP_IMAGE_UPLOAD_PROVIDER as ImageUploadProvider) || 'imgur'
const rawProvider = process.env.VUE_APP_IMAGE_UPLOAD_PROVIDER
let IMAGE_UPLOAD_PROVIDER: ImageUploadProvider
if (rawProvider === 'imgur' || rawProvider === 'backend') {
IMAGE_UPLOAD_PROVIDER = rawProvider
} else {
if (rawProvider) {
console.warn(`Invalid VUE_APP_IMAGE_UPLOAD_PROVIDER: ${rawProvider}. Falling back to 'imgur'`)
}
IMAGE_UPLOAD_PROVIDER = 'imgur'
}

Copilot uses AI. Check for mistakes.
@Yukaii Yukaii merged commit 22c5fdd into production Dec 5, 2025
24 checks passed
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.

2 participants