Search code examples
githubstorageonline-storage

Can GitHub be used for hosting files (mp3 and images)?


I am looking for free file hosting service which allow me to get static links to each individual files easily. So, file 1.png, 2.png, 3.png should be assigned to URL: www.something.com/somepath/1.png, www.something.com/somepath/2.png, www.something.com/somepath/3.png respectively

Later, the files will be downloaded by mobile app which potentially installed by many users.

After searching the Internet, among major storage providers, only Dropbox and GitHub enables me to get public direct unrandomised URL (some other services, e.g. SkyDrive, Box, Copy, 4Shared, MediaFire randomise the filenames). Of course, nothing prevent me from using Dropbox, but I heard that Dropbox may block the access if the traffic is too high.

Anybody know whether GitHub allows us to do so? I understand that Git is not meant for tracking binary files, but since the files will be static (only 1 commit is sufficient) no delta need to be tracked.

The maximum individual file size is 3-4 MB. There will be 1,000 of such files. All files are not copyrighted.

*the mobile app will be open source & not for commercial purpose.


Solution

  • It is allowed, but:

    • GitHub has a "soft" limit of 1GB per repo, which means if you consistently remains above that limit, you will get emails asking you to reduce the size of your repos.
      In your case, 3 to 4 GB would be too much on one repo.
    • GitHub ToS disallow using the service "for any illegal or unauthorized purpose", os make sure your mp3s don't violate some copyright law.

    In short, it is possible, but it certainly is not what GitHub is for.


    An artifact repo like Nexus does offer non-randomized names, so if you can publish it to service like Amazon S3 (there is no Nexus support out of the box, but it is possible)