Using basename() to avoid sending a path to the server