File upload doesn't respect .gitattributes to put the file in LFS #8360

Closed
opened 2025-11-02 08:03:39 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @baltitenger on GitHub (Jan 16, 2022).

Gitea Version

1.15.8 and 1.16.0_dev_850_ga38ab71b20

Git Version

2.34.1

Operating System

Linux

How are you running Gitea?

I'm using the Arch Linux package for gitea and running it through the systemd service provided by the package.

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/baltitenger/d048c3b523cc44969ad3f21c294b26a0

Description

Uploading files using the web UI ignores .gitattributes and adds files to git instead of uploading them to LFS.
The issue can be seen in this test repo.
My app.ini can be seen in this gist.

Perhaps related to #17496

Screenshots

The repo after uploading the file through the web UI:
image

Originally created by @baltitenger on GitHub (Jan 16, 2022). ### Gitea Version 1.15.8 and 1.16.0_dev_850_ga38ab71b20 ### Git Version 2.34.1 ### Operating System Linux ### How are you running Gitea? I'm using the Arch Linux package for gitea and running it through the systemd service provided by the package. ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/baltitenger/d048c3b523cc44969ad3f21c294b26a0 ### Description Uploading files using the web UI ignores `.gitattributes` and adds files to git instead of uploading them to LFS. The issue can be seen in [this test repo](https://git.desnull.hu/baltazar/lfs-test). My `app.ini` can be seen in [this gist](https://gist.github.com/baltitenger/19a9843c53d8a03c4390a3a81e4f2f8b). Perhaps related to #17496 ### Screenshots The repo after uploading the file through the web UI: ![image](https://user-images.githubusercontent.com/21960678/149661302-434db829-4726-4415-abf7-c454655807bc.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8360