fix: add metadata about the source of the files in S3

This commit is contained in:
tdurieux
2022-08-10 13:58:37 +02:00
parent d9225fc5ee
commit 9d9a6879ab
7 changed files with 861 additions and 775 deletions

View File

@@ -97,7 +97,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
try {
const downloadStream = got.stream(response.url);
downloadStream.addListener("downloadProgress", (p) => (progress = p));
await storage.extractZip(originalPath, downloadStream);
await storage.extractZip(originalPath, downloadStream, null, this);
} catch (error) {
await this.repository.updateStatus("error", "unable_to_download");
throw new AnonymousError("unable_to_download", {

View File

@@ -58,7 +58,7 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
}
if (this.repository.status != "ready")
await this.repository.updateStatus("ready");
await storage.write(file.originalCachePath, content);
await storage.write(file.originalCachePath, content, file, this);
return stream.Readable.from(content);
} catch (error) {
throw new AnonymousError("file_too_big", {