Startvex Media Service

Dedicated media service for user-generated files. This service validates the authenticated user through the main Startvex users table, processes images safely on the server, and exposes the final media assets through the public media domain.

Local Base URL http://127.0.0.1/MEDIA_STARTVEX/
Production Base URL https://media.startvex.com/
Storage Rule Stores JPG files in /users/profile using md5(user_id).jpg, resized proportionally up to 400x400 pixels.

Endpoints

POST
/api/v1/users/profile/upload

Upload or replace the user profile image

Accepts a multipart/form-data request with the authenticated access token and an image file. The service validates the token against the main users table, converts the image to JPG, resizes it proportionally to fit within 400x400 pixels, and stores it at /users/profile/<md5(user_id)>.jpg.

Show Details Hide Details

Request Fields

Field Type Required Description
Content-Type header Yes multipart/form-data
access_token string Yes Authenticated user access token.
profile_image file Yes Image file in JPG, PNG or WEBP, up to 5 MB.

Responses

Status Description
200 Upload completed and file replaced or created successfully.
401 Missing, invalid, or expired access token.
415 Unsupported image type.
422 Validation failed for the submitted form-data.
500 Server-side processing or filesystem failure.

Response Fields

Field Type Description
message string Operation result message.
user_id integer Authenticated user identifier derived from the access token.
profile_image_path string Relative public path stored by the application.
profile_image_url string Absolute public URL for the JPG image.
width integer Final JPG width in pixels.
height integer Final JPG height in pixels.
size_bytes integer Final file size in bytes.
mime_type string Final stored MIME type.