Fix template upload endpoint

Created an endpoint that included the directory path of the file.