[MM-62845] Fix: Compliance export download link fails from S3 when using a dedicated file store (#30092)

* add ExportZipReader and use that for job exports

* fix legacy code to use ExportFileReader
Этот коммит содержится в:
Christopher Poile
2025-02-05 07:31:07 -05:00
коммит произвёл GitHub
родитель 3a73b517e2
Коммит 6560b4c0cf
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@@ -144,6 +144,10 @@ func (s *Server) exportFileReader(path string) (filestore.ReadCloseSeeker, *mode
return fileReader(s.ExportFileBackend(), path)
}
func (s *Server) exportZipReader(path string, deflate bool) (io.ReadCloser, *model.AppError) {
return zipReader(s.ExportFileBackend(), path, deflate)
}
// FileReader returns a ReadCloseSeeker for path from the FileBackend.
//
// The caller is responsible for closing the returned ReadCloseSeeker.
@@ -165,6 +169,14 @@ func (a *App) ExportFileReader(path string) (filestore.ReadCloseSeeker, *model.A
return a.Srv().exportFileReader(path)
}
// ExportZipReader returns a ReadCloser for path from the ExportFileBackend.
// If deflate is true, the zip will use compression.
//
// The caller is responsible for closing the returned ReadCloser.
func (a *App) ExportZipReader(path string, deflate bool) (io.ReadCloser, *model.AppError) {
return a.Srv().exportZipReader(path, deflate)
}
func (a *App) FileExists(path string) (bool, *model.AppError) {
return a.Srv().fileExists(path)
}