mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-06-03 06:08:03 +02:00
fix: return the binary of the streamed content instead of a string
This commit is contained in:
@@ -52,7 +52,7 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
|
|||||||
if (this.repository.status != "ready")
|
if (this.repository.status != "ready")
|
||||||
await this.repository.updateStatus("ready");
|
await this.repository.updateStatus("ready");
|
||||||
await storage.write(file.originalCachePath, content);
|
await storage.write(file.originalCachePath, content);
|
||||||
return stream.Readable.from(content.toString());
|
return stream.Readable.from(content);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status == 403) {
|
if (error.status == 403) {
|
||||||
throw new AnonymousError("file_too_big", file);
|
throw new AnonymousError("file_too_big", file);
|
||||||
|
|||||||
Reference in New Issue
Block a user