We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a686900 commit 1bbfcd5Copy full SHA for 1bbfcd5
client.go
@@ -232,7 +232,18 @@ func (c *Client) Get() error {
232
// Destination is the base name of the URL path in "any" mode when
233
// a file source is detected.
234
if mode == ClientModeFile {
235
- dst = filepath.Join(dst, filepath.Base(u.Path))
+ filename := filepath.Base(u.Path)
236
+
237
+ // Determine if we have a custom file name
238
+ if v := q.Get("filename"); v != "" {
239
+ // Delete the query parameter if we have it.
240
+ q.Del("filename")
241
+ u.RawQuery = q.Encode()
242
243
+ filename = v
244
+ }
245
246
+ dst = filepath.Join(dst, filename)
247
}
248
249
0 commit comments