🦾Upload Song Chunk
Handles chunked uploads of large audio files. This endpoint allows uploading a song in smaller chunks.
POST /upload/song/uploadSongChunkRequest Headers
Content-Type: multipart/form-data
Parameters
chunk (file) - The chunk of the audio file to be uploaded.
coverImage (file) - (Optional) The cover image of the song.
chunkIndex (number) - The index of the current chunk.
totalChunks (number) - The total number of chunks.
fileName (string) - The name of the file being uploaded.
fileSize (number) - The total size of the file in bytes.
name (string) - Name of the song.
username (string) - Username of the uploader.
profileUrl (string) - URL of the uploader's profile.
duration (number) - Duration of the song in seconds.
isPrivate (boolean) - Whether the song is private.
songPassword (string) - (Optional) Password to access the song if private.
uploaderId (string) - Unique identifier of the uploader
Response
Status 200 - If chunk uploaded successfully but not the final chunk:
{ "message": "Chunk uploaded successfully." }Status 201 - If all chunks are uploaded and file is reassembled:
{ "message": "Song uploaded successfully.", "song": { "name": "string", "artist": "string", "artistUrl": "string", "audioUrl": "string", "coverImageUrl": "string", "createdAt": "date", "isPrivate": "boolean", "songPassword": "string", "uploaderId": "string" } }
Last updated