new upload_to_path function for dynamic paths