diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-09-28 16:58:20 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-10-04 11:03:59 +0200 |
| commit | 978d1f191b7f89d799122c5639b01b30d57ca25a (patch) | |
| tree | 50a37ffd853360931b0b6955e60c31f0264786a4 /pkg/asset/storage.go | |
| parent | 37f7ec75a3672de8b3280d0b59ef2d4c97e5097d (diff) | |
syz-manager: upload mounted images from repros
Collect mounted images from repros and upload them to the asset
storage. Report the resulting download URLs to the dashboard.
Diffstat (limited to 'pkg/asset/storage.go')
| -rw-r--r-- | pkg/asset/storage.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/asset/storage.go b/pkg/asset/storage.go index 0b008b744..6905b0a07 100644 --- a/pkg/asset/storage.go +++ b/pkg/asset/storage.go @@ -182,6 +182,18 @@ func (storage *Storage) ReportBuildAssets(build *dashapi.Build, assets ...dashap }) } +func (storage *Storage) UploadCrashAsset(reader io.Reader, fileName string, assetType dashapi.AssetType, + extra *ExtraUploadArg) (dashapi.NewAsset, error) { + url, err := storage.uploadFileStream(reader, assetType, fileName, extra) + if err != nil { + return dashapi.NewAsset{}, err + } + return dashapi.NewAsset{ + Type: assetType, + DownloadURL: url, + }, nil +} + var ErrAssetDoesNotExist = errors.New("the asset did not exist") type FileExistsError struct { |
