mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-18 09:02:39 +01:00
Add SHA to FileInfo
This commit is contained in:
parent
1152394bc1
commit
f58be0d1c1
@ -41,6 +41,7 @@ type FileInfo struct {
|
||||
URL string
|
||||
Size int64
|
||||
Avatar bool
|
||||
SHA string
|
||||
}
|
||||
|
||||
type ChannelInfo struct {
|
||||
|
@ -362,6 +362,7 @@ func (gw *Gateway) handleFiles(msg *config.Message) {
|
||||
durl := gw.Config.General.MediaServerDownload + "/" + sha1sum + "/" + fi.Name
|
||||
extra := msg.Extra["file"][i].(config.FileInfo)
|
||||
extra.URL = durl
|
||||
extra.SHA = sha1sum
|
||||
msg.Extra["file"][i] = extra
|
||||
req, _ := http.NewRequest("PUT", url, reader)
|
||||
req.Header.Set("Content-Type", "binary/octet-stream")
|
||||
|
Loading…
Reference in New Issue
Block a user