fix: update file extension from .fx to .tool in export functionality

This commit is contained in:
CaptainB 2025-06-18 15:28:07 +08:00
parent f4e15d76a0
commit 45508b08a3
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ class ToolSerializer(serializers.Serializer):
mk_instance = ToolInstance(tool_dict, 'v2')
tool_pickle = pickle.dumps(mk_instance)
response = HttpResponse(content_type='text/plain', content=tool_pickle)
response['Content-Disposition'] = f'attachment; filename="{tool.name}.fx"'
response['Content-Disposition'] = f'attachment; filename="{tool.name}.tool"'
return response
except Exception as e:
return result.error(str(e), response_status=status.HTTP_500_INTERNAL_SERVER_ERROR)

View File

@ -99,7 +99,7 @@ const putToolIcon: (
}
const exportTool = (id: string, name: string, loading?: Ref<boolean>) => {
return exportFile(name + '.fx', `${prefix.value}/${id}/export`, undefined, loading)
return exportFile(name + '.tool', `${prefix.value}/${id}/export`, undefined, loading)
}
/**