Image error solve update

This commit is contained in:
2025-10-10 09:48:04 +05:30
parent 2f6c0a08b4
commit 7763940b2a
3 changed files with 36 additions and 6 deletions

View File

@ -41,7 +41,7 @@ spring:
throw-exception-if-no-handler-found: true
web:
resources:
add-mappings: false
add-mappings: true # Changed from false to true to serve static files
# File upload configuration
file:
@ -50,10 +50,10 @@ file:
app:
base-url: ${APP_BASE_URL:http://localhost:8080}
# Updated public URLs to include image endpoints
public-urls: /user/login,/user/register,/user/*/profile-image,/user/*/profile-image/**,/professors,/professors/**,/api/posts,/api/posts/*,/api/posts/posted,/api/posts/tag/*,/api/posts/tags/count,/api/files/**,/professor,/professor/*,/api/events,/api/events/*,/api/public/**,/api/jobs/active,/api/job-applications,/api/courses/active,/api/courses/*,/api/course-applications,/api/upcoming-events/active
# Added /uploads/** to public URLs
public-urls: /user/login,/user/register,/user/*/profile-image,/user/*/profile-image/**,/professors,/professors/**,/api/posts,/api/posts/*,/api/posts/posted,/api/posts/tag/*,/api/posts/tags/count,/api/files/**,/uploads/**,/professor,/professor/*,/api/events,/api/events/*,/api/public/**,/api/jobs/active,/api/job-applications,/api/courses/active,/api/courses/*,/api/course-applications,/api/upcoming-events/active
cors:
allowed-origins: http://localhost:4200,https://localhost:4200,http://localhost:3000,https://localhost:3000,http://art-support-portal.s3-website.eu-north-1.amazonaws.com,http://portal.shyshkin.net,*
allowed-origins: http://localhost:4200,https://localhost:4200,http://localhost:3000,https://localhost:3000,http://art-support-portal.s3-website.eu-north-1.amazonaws.com,http://portal.shyshkin.net,https://maincmc.rootxwire.com,https://cmcbackend.rootxwire.com
jwt:
secret: custom_text
@ -67,9 +67,9 @@ file:
upload:
directory: /var/uploads/blog-images
app:
base-url: https://cmcadminfrontend.com
base-url: https://cmcbackend.rootxwire.com
cors:
allowed-origins: https://cmcadminfrontend.com,https://cmcadminfrontend.com
allowed-origins: https://maincmc.rootxwire.com,https://cmcbackend.rootxwire.com, https://cmcadminfrontend.rootxwire.com
---
# Development file upload configuration with custom directory