Using Via HttpRequest get corrupted file
nonunknown opened this issue · 2 comments
Hi I'm a Game developer, Currently I'm using Godot Engine , making a tool for it and one of it needs is get a specific folder from Github, Gitzip is perfect for this, but when downloading the file using Godot I get 21kb while the file has 121kb, I just using a HTTPRequest with a url like this:
in the browser works perfectly, there is a way to solve this?
I was thinking on an API to get the direct link to the zip file i.e: https://github.com/file.zip
Their are different ways.
The browser execute javascript to fetch contents by using Github API, and use HTTPRequest just fetch HTML only, hence you can not get zip file.
I think there are 3 ways to achieve this:
- Use SVN library (stackoverflow answer)
- I make the service on server (i.e. implement the browser javascript to backend)
- Copy gitzip algorithm and implement in Godot Engine
1th or 3th is recommended. And the 2nd must be a large cost, unless someone sponsored, I don’t want to do it :-(
Hope it helps.
3rd options seems to be the answer here, thank you very much for your time!!!