leezng commented on code in PR #7972:
URL: https://github.com/apache/inlong/pull/7972#discussion_r1188250739


##########
inlong-dashboard/src/ui/components/FieldParseModule/index.tsx:
##########
@@ -85,6 +88,63 @@ const FieldParseModule: React.FC<FieldParseModuleProps> = ({
     onAppend([...previewData]);
     onHide();
   };
+  const downloadTemplate = async () => {
+    try {
+      const response = await fetch('stream/downloadExcelTemplate');
+      const blob = await response.blob();
+      const url = window.URL.createObjectURL(new Blob([blob]));
+      const link = document.createElement('a');
+      link.href = url;

Review Comment:
   Is it possible to directly set `<a href="url">` without adding another layer 
of blob?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to