Please share what endpoint you are using, as well as steps to reproduce the issue.
When you say filename, what do you mean? The download_url? Can you please share the download URL you are trying to use (feel free to private message it to me).
What is your use case for getting the filename from the URL?
Yeah, that’s it. Ultimately we need to know the filename so we could reference it later and associate it with the meeting owner.
I was hoping to find an alternative to grepping the header (in different ways based on type of file) to assign a name of file. I guess web browsers are smarter at parsing through the headers coming across, offering a correct name to do the save as …
Doing a
curl -O -L https://hawaii.zoom.us/rec/download/uZIvJu-h-z03EtHDsgSDAadxW9S5f6Os1ihL__cOmRvkVCVVOgKlbrAbard68ha8UjTsTkS6wGINKiPA
results in a saved file named 'uZIvJu-h-z03EtHDsgSDAadxW9S5f6Os1ihL__cOmRvkVCVVOgKlbrAbard68ha8UjTsTkS6wGINKiPA'
so now I realize that -O is naming 'uZIvJu-h-z03EtHDsgSDAadxW9S5f6Os1ihL__cOmRvkVCVVOgKlbrAbard68ha8UjTsTkS6wGINKiPA' .. cause that's the "named" filename from the download URL.
Not really. I’ll need to make one curl request to download the headers from the download URL, parse it to get the info we need (the real name of file), then do another fetch to download and correctly name the file. Maybe I could do it in one fetch, but it’s still hunt for the filename then rename.
@kchan quote=“tommy, post:8, topic:8502”]
Is there a way to give a specific file name when saving a file via cURL?
[/quote] @kchan
I am trying to do the same but when i read the headers i don’t get the file name, getting a lot of other info. Can you please share your code that is used to get the original Zoom file name.
Thanks in advance
Sorry for the late reply. I forgot my question was still floating out there. We’re still finding out the filename via headers. I vaguely remember that we need to do two different approaches (searching) based on the kind of file.
However the issue that I had about not having the correct headers, initially was due to authentication. For most things we’d send authentication as part of the header packet (instead of part of the URL). For downloads you don’t include authentication as part of the header packet.