]> Sergey Matveev's repositories - mmfileget.git/blob - README
Do not overwrite existing file
[mmfileget.git] / README
1 Utility for downloading files from Mattermost.
2
3 Mattermost (MM) gives URLs for file downloading like
4 https://MACHINE/api/v4/files/FILE
5 and you can not download it with simple fetch/curl/wget.
6 That utility uses MM's API to download it.
7
8     $ mmfileget https://MACHINE/api/v4/files/FILE
9     Name: Some filename.jpg
10     Type: image/jpeg
11     Size: 43713
12     Download? Ctrl-D/C
13
14 Press Ctrl-D to allow file download under provided name.
15 Press Ctrl-C to quit program.
16
17     $ mmfileget https://MACHINE/api/v4/files/FILE TARGET-NAME
18
19 will download file and save it in TARGET-NAME file.
20
21 It uses ~/.netrc file (single line per machine format) for finding
22 authentication credentials for MACHINE. You can override it with NETRC
23 environment variable.