You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Report: Download Functionality Not Working (Internet Connection Error)
Description:
I am facing an issue with the download functionality in the application. When I try to download a recording, I receive an "internet connection error" in the download history, and the download does not proceed as expected.
Steps to Reproduce:
Download Function:
Here’s the downloadRecording function that I am using to handle the download:
constdownloadRecording=(recordingUrl,fileName)=>{consta=document.createElement("a");a.href=recordingUrl;a.download=`${fileName}.mp3`;// Use the provided file namea.click();// Trigger the download};
Using the Download Function:
In the component where the user can download a recording, I’m using the following code to find the selected recording and call the downloadRecording function:
const{ downloadRecording, recordings }=useContext(UserContext);constselectedRecording=recordings.find((recording)=>recording.id===audioId);action.icon==="Download" ? (<divonClick={()=>{// Only download if a specific recording is foundif(selectedRecording){console.log("Downloading:",{url: selectedRecording.url,name: selectedRecording.name,});downloadRecording(selectedRecording.url,selectedRecording.name);}else{console.error("No recording found for ID:",audioId);alert("Recording not found. Please try again.");}}}style={{cursor: "pointer"}}>{Content}</div>);
Expected Behavior:
The recording should download successfully when the "Download" option is clicked, with the file being saved as fileName.mp3.
Actual Behavior:
The download fails with an "internet connection error" message in the download history, and the download does not proceed.
Troubleshooting Steps Taken:
I’ve logged the selectedRecording.url and selectedRecording.name to verify that the correct values are being passed to the downloadRecording function.
The file does not download, and the error message appears, which suggests there may be an issue with how the blob URL is being handled.
The text was updated successfully, but these errors were encountered:
Bug Report: Download Functionality Not Working (Internet Connection Error)
Description:
I am facing an issue with the download functionality in the application. When I try to download a recording, I receive an "internet connection error" in the download history, and the download does not proceed as expected.
Steps to Reproduce:
Download Function:
Here’s the
downloadRecording
function that I am using to handle the download:Using the Download Function:
In the component where the user can download a recording, I’m using the following code to find the selected recording and call the
downloadRecording
function:Expected Behavior:
The recording should download successfully when the "Download" option is clicked, with the file being saved as
fileName.mp3
.Actual Behavior:
The download fails with an "internet connection error" message in the download history, and the download does not proceed.
Troubleshooting Steps Taken:
selectedRecording.url
andselectedRecording.name
to verify that the correct values are being passed to thedownloadRecording
function.The text was updated successfully, but these errors were encountered: