chai-backend
chai-backend copied to clipboard
Error When The Avatar File and CoverImage File Have Same Name
Getting an error when i upload same files in avatarfile and coverimage ! I guess this edge case wasn't checked !
Probable Solution -
if (avatarLocalPath === coverImageLocalPath) {
throw new ApiError(400, "Both Images Have Same Name.");
}