🍒Upload Song Chunk

Handles chunked uploads for large audio files specifically for fakedown purposes, and updates the creator's social media URLs.

POST /upload/song/uploadSongChunk/ftakedown

Request Headers

  • Content-Type: multipart/form-data

Request 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.

  • youtubeUrl (string) - YouTube URL of the creator.

  • spotifyUrl (string) - Spotify URL of the creator.

  • soundcloudUrl (string) - SoundCloud URL of the creator.

  • instagramUrl (string) - Instagram URL of the creator.

  • twitterUrl (string) - Twitter URL of the creator.

  • facebookUrl (string) - Facebook URL of the creator.

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": "Chunk uploaded and file reassembled successfully",
      "song": {
        "name": "string",
        "artist": "string",
        "artistUrl": "string",
        "audioUrl": "string",
        "coverImageUrl": "string",
        "createdAt": "date",
        "isPrivate": "boolean",
        "songPassword": "string",
        "uploaderId": "string"
      },
      "creator": {
        "username": "string",
        "youtubeUrl": "string",
        "spotifyUrl": "string",
        "soundcloudUrl": "string",
        "instagramUrl": "string",
        "twitterUrl": "string",
        "facebookUrl": "string"
      }
    }
  • Status 500 - If there is an error during the upload process:

    {
      "message": "Error message"
    }

Last updated