Large media not uploading

For some reason I can’t get my files to upload to netlify large media. It keeps showing favicon.png, which I tracked at my first setup. But this file is no longer tracked, and I have tried removing large media from the site entirely, to start over, but to no avail.

If I look at my repo the only tracked files is an image in the root directory /media. But this is not uploading. How do I troubleshoot?

In my repo the image in /media is showing as

version Git Large File Storage | Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
oid sha256 (removed sha256)
size 71633

site name: johans-loge.dk

Hi, @viktor89, first please confirm which files are tracked by Git LFS using this:

git lfs ls-files

Next, confirm that these files are being placed in the publish directory during the site build process.

If you still don’t see all tracked files in Large Media, then you can attempt to push the Git LFS assets to Large Media with the following command:

git lfs push --all origin

This should upload all the assets to Large Media. If they were missing before, a new deploy will be needed to publish them.

If this still doesn’t work, please let us know.

HI luke

thanks for the reply! I have verified the correct directory/files are being tracked now.

I am not quite sure how to check if files are being placed in /publis during build? The build log doesn’t say anything other than:

1:05:19 PM: Netlify Large Media is enabled, running git commands with GIT_LFS_SKIP_SMUDGE=1

Now I tried the git lfs push --all origin and pushed a fresh build after. That didn’t work. Only file I have showing up in Netlify Large Media is favicon.png, which isn’t tracked by git lfs in my repo

Hi @viktor89, I think you can check what ends up in your publish directory by downloading the build from the Deploys tab in Netlify.

Hi, @viktor89, what @jcespinoza says is correct. You can also append something like ls -R publish_directory_here or tree publish_directory_here to your command to log to the build logs the files in the deploy to the build logs.

Using @jcespinoza solution will likely be much less effort in most cases though.

Would you please check one way or other and let us know if the Git LFS tracked files are in the publish directory? Also, would you please confirm the content of the files themselves to see what they contain?

I ask because files in Large Media should only have their Git LFS text pointer in the deploy and not the actual file. Here is an example of the text pointer content Git LFS tracked file:

version https://git-lfs.github.com/spec/v1
oid sha256:36fbd35d988b57f856450f764cbc47aee4ba7c441de89822d6ee2d8c6c24aee7
size 1036491

Hi @luke

I am having the same issue… I’ve been able to log using ls -R dist on the build command and all my files are indeed logged in there. Unfortunately, when I try to access some of these files in the browser, I am still seeing {"code":404,"msg":"File not found"}. All git lfs and Netlify Large Media are setup.

If I go to the Netlify Large Media tab of the Netlify UI and search for a file name, some of them cannot be found. I am really not sure what could be wrong.

I believe this is now working. git lfs push --all a second time and I’m seeing some of the images that were previously a 404 display the image. Disregard this comment! Thank you Netlify Team :heart: