When serving m4a files on http or webdav the "right click" -> "save link as"* procedure give out a mp3 file. One has to manually change the extention to m4a.
Tested in Chrome, Vivaldi and Edge, I get the same behaviour in all three of them.
Am I missing something in the configuration of the serve command ?
*I'm not sure how this is stated in English, it is "Enregistrer le lien sous..." in French in Chrome.
What is your rclone version (output from rclone version)
C:\Users\danbei>rclone version
rclone v1.56.1
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.19042.1202 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.16.8
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
I use local remote in this example
The command you were trying to run (eg rclone copy /tmp remote:tmp)
There is no problem downloading the file via the browser neither, it is just that the extension is changed (see 1st screen shot attached below). I'm confused because I don't get this behaviour with other http servers (see 2nd screen shot attached below).
Note that I noticed an extension change only for m4a files. I tested wav, flac, mp3 and mp4 files.
If you check the browser's developer tools, does the working server return relevant headers, e.g. Content-Type, Content-Disposition, that rclone serve does not?
When I copy the html source of the page served by rclone into a file and open the file in my browser the behaviour is correct : m4a file are downloaded as m4a.
I can copy the source of the page served by rclone if needed.
The case is that if the backend does not supply MIME information, like local filesystem, as listed here, then serve http will use the file extension and lookup in a os dependent mime database. In my test it ends up with audio/mpeg, and based on that the browser apparantly deduces .mp3 extension.
Haven't checked what mime type a working system reports, but probably audio/x-m4a og audio/mp4 or something.