chai-backend icon indicating copy to clipboard operation
chai-backend copied to clipboard

Error When The Avatar File and CoverImage File Have Same Name

Open anmol420 opened this issue 8 months ago • 2 comments

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.");
}

anmol420 avatar Jun 10 '24 22:06 anmol420