I’m using netlify to deploy an 11ty project on github.
This project uses a 318mb Mp3 file that I tried to store on git lfs via github. By following the documentation it seems I succeeded in using git LFS. After all github says so:
but When I go to the deployed website the file isn’t even in the assets folder
I’ve added all the setup on netlify to use the github lfs not their lfs but the file isnt there.
So then I try downloading the raw file from GitHub and get this:
A blank audio with nothing inside of it. Meaning that the file isn’t on the website because the file isn’t on GitHub.
So, then I tried removing the file, committing the removal, then adding it back in, committing that, then using git lfs push --all origin in the terminal and it saying in response Uploading LFS objects: 100% (1/1), 334 MB | 0 B/s, done.
I don’t think the Netlify solution (or any LFS solution) is meant for streaming audio/video assets. I would suggest using a CDN (like cloudflare or whatever). There are also audio-only hosting sites (like sound cloud) which would give you a player embed and I’m guessing some management tools.
Never used Git LFS or Netlify with LFS so I’m not going to speculate on what is wrong.
No it is meant for tracking large files. Why do you need to track it? Will it change? Tracking binary files is more of a special case and it doesn’t sound like you need it.
You do not need to track the audio file. You are just making it more complicated than it needs to be. Use a CDN or an audio hosting site. Or if the site lets you upload assets you can just link to the hosted asset (without the binary file being tracked by Git).
I guess I was confused because netlify large media marketing and the github docs describe storing images, .psd files, and audio files with git LFS but honestly I’ve been debugging this all this morning.
The reason I wanted to go this route is because I wanted something that was plain html, css, and js without any embeds or iframes or whatnot. I’m going to investigate my options because git lfs is just a pain to work with so far.
Netlify Large Media is not suitable for streaming audio or video files. However, storing these assets for download should work well.
Netlify Large Media is intended for files up to 100 MB in size.
I realize you might be thinking of the audio file as an image file or other small binary files which you are used to pushing to GitHub. But it isn’t really the same. There is a reason why GitHub has file size limitations. They are not a binary file hosting service. Git is for version tracking/control and GitHub is just a web service to host Git repos.
Don’t get me wrong, I can see the appeal of just having everything stored in one place and it would be nice if it worked that way.
However netlify does allow drag an drop upload as long as there’s an index.html so what I’m going to try is uploading an index.html and the audio file together and then linking to the hosted asset.