Remove trailing slash in attachment fetch api call