dosubot[bot] commented on issue #32858:
URL: https://github.com/apache/superset/issues/32858#issuecomment-2754249325

   <!-- Greeting -->
   Hello @Regonos! I'm here to help you with any issues you encounter. I can 
assist with bug resolution, answer your questions, and guide you to become a 
contributor.
   
   <!-- Answer -->
   The issue you're experiencing with the email report attachment having the 
wrong file extension is likely due to the way Superset handles multiple query 
results. When server pagination is enabled, it can result in multiple queries 
being executed, which leads to the results being bundled into a ZIP file. 
However, the attachment is still being labeled with a `.csv` extension instead 
of `.zip`.
   
   The logic for compressing multiple query results into a ZIP file is found in 
the `superset/charts/data/api.py` file. Specifically, when there are multiple 
queries, the results are bundled as a ZIP file 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/charts/data/api.py)</sup>.
   
   To resolve this issue, you would need to ensure that the file extension in 
the email report matches the actual file format. This might involve modifying 
the logic that assigns the file extension in the `Content-Disposition` header 
of the email attachment. The relevant code for setting the file extension is 
located in the `superset/utils/core.py` file, where the `filename` parameter is 
set 
<sup>[[2]](https://github.com/apache/superset/blob/master/superset/utils/core.py)</sup>.
   
   You may need to adjust the code to correctly set the file extension based on 
whether the results are being compressed into a ZIP file or not.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b7ea7a1c-b2e5-4337-8891-f6fd213323d5?feedback_type=other)</sup>
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to