Closed
Description
- Gitea version (or commit ref): 1.8.3
- Operating system: Ubuntu 18.04
- Database (use
[x]
):- PostgreSQL
- [ x] MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)NoNot relevant
- Log gist:
Description
Despite this setting:
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/java-archive
I does not allow upload jar files.
If I set /, then the upload is allowed.
application/* also does not allow me to do that.
What should be the appropriate setting?
...
Activity
PedroAS7 commentedon Aug 8, 2019
application/java-archive not working on Gitea 1.9.0 either
tomposmiko commentedon Aug 16, 2019
What is the severity of this issue from your perspective?
lunny commentedon Aug 16, 2019
Where did you upload? Releases or issues?
lunny commentedon Aug 16, 2019
There are two allowed_types, you may changed the wrong section. I uploaded successfully on my local instance both the releases and issues.
tomposmiko commentedon Aug 16, 2019
releases
tomposmiko commentedon Aug 23, 2019
Hmm, this is interesting.
$ mkdir -p data/tmp/uploads
$ chown ...
$ service gitea restart
And it starts working.
However, after second restart, it stops working, because the tmp directory is gone!
In fact I investigated the following scenarios:
no [repsitory.upload] section in app.ini
-> no success, even if the directory is created.
[repository.upload]
ENABLED = true
TEMP_PATH = data/tmp/uploads
FILE_MAX_SIZE = 3
MAX_FILES = 5
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/java-archive
It works after first service restart if the directory is created. It does not work after the second restart, the tmp directory is gone.
ENABLED = true
TEMP_PATH = /data/gitea/data/tmp/uploads
FILE_MAX_SIZE = 3
MAX_FILES = 5
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/java-archive
Directory created, service restarted.
No success
Directory created, service restarted.
No success
So I got lost, I have no idea
lafriks commentedon Aug 24, 2019
You should try mount tmp as volume in docker
tomposmiko commentedon Aug 24, 2019
I don't use docker.
tomposmiko commentedon Aug 27, 2019
Hmm, this is interesting.
$ mkdir -p data/tmp/uploads
$ chown ...
$ service gitea restart
And it starts working.
However, after second restart, it stops working, because the tmp directory is gone!
In fact I investigated the following scenarios:
no [repsitory.upload] section in app.ini
-> no success, even if the directory is created.
[repository.upload]
ENABLED = true
TEMP_PATH = data/tmp/uploads
FILE_MAX_SIZE = 3
MAX_FILES = 5
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/java-archive
It works after first service restart if the directory is created. It does not work after the second restart, the tmp directory is gone.
ENABLED = true
TEMP_PATH = /data/gitea/data/tmp/uploads
FILE_MAX_SIZE = 3
MAX_FILES = 5
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/java-archive
Directory created, service restarted.
No success
Directory created, service restarted.
No success
So I got lost, I have no idea
tomposmiko commentedon Aug 27, 2019
Is it a bug or do I miss something?
sapk commentedon Aug 28, 2019
Gitea should support upload of java archive so it must be a configuration or system problem.
To be able to debug, do you have any log of the failed upload ?
stale commentedon Oct 27, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
36 remaining items