mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 19:02:45 +00:00
fix: add metadata about the source of the files in S3
This commit is contained in:
@@ -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", {
|
||||
|
||||
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user