use carteroJson.publicUrl since we make sure that PublicUrl always start with / in cartero

use:

fileName = carteroJson.publicUrl + fileName.replace( carteroJson.publicDir, "" );