mirror of
https://github.com/larksuite/cli.git
synced 2026-07-08 10:08:02 +08:00
mediaBuffer.FileName() returned a hardcoded "media"+ext, so IM file messages sent via URL displayed generic names like "media.pdf" instead of the filename parsed from the URL. This regressed the pre-refactor tempfile path which at least carried a unique basename. Store fileNameFromURL(rawURL) on the buffer and return it from FileName(). Split newMediaBuffer so the URL-to-filename wiring is reachable from tests without going through the hardened download transport. Also lock in that the local upload branch keeps filepath.Base(filePath) as file_name, so the URL fix cannot silently regress the local branch later. Change-Id: I729b217e9dc9237aeb89c2b89df86a37ad64a840