41 Commits

Author SHA1 Message Date
kumfo f05f1eb80d feat(menu): update admin menu settings to include questions, tags, and advanced options 2026-01-22 12:25:32 +08:00
ferhat elmas 670aa32325 refactor(lint): add new linters and fix their issues
* gocritic
* misspell
* modernize (aside, bumping go would be nice)
* testifylint
* unconvert
* unparam
* whitespace

related to #1432

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2025-12-05 10:45:55 +08:00
LinkinStars 5e705a124b refactor(lint): improve error handling and code consistency across multiple files 2025-12-01 12:27:25 +08:00
DanielAuerX def0559a55 Fix file record and delete files (branding and avatar) (#1335)
- [x] create file_record table
- [x] avatar and branding files are added to file_record
- [x] branding files are being deleted
- [x] avatar files are being deleted
- [x] reload latest avatar (frontend) after backend state is being
updated

problems addressed in the pr:
- clean up job fails, because it cannot access file_record table
- avatar and branding files are not added to the file_record table
- avatar and branding files are never deleted
- after an avatar is being updated/deleted, the old file is still being
requested due to browser caching. This is causing error logs ("no such
file or directory") in the backend.

cf. conversation in [pr
1326](https://github.com/apache/answer/pull/1326)

---------

Co-authored-by: broccoli <lekker.broccoli@gmail.com>
Co-authored-by: LinkinStars <linkinstar@foxmail.com>
2025-05-23 15:07:14 +08:00
LinkinStars 5cffab8649 feat(service): implement file cleanup and deletion functionality 2025-01-10 10:43:35 +08:00
LinkinStars 0618947350 refactor(name): rename incubator-answer 2025-01-07 10:39:23 +08:00
LinkinStars 7a8cc6a571 refactor(uploader): improve file upload and download functionality subpath constants
- Adjust file download
2024-12-09 11:52:18 +08:00
LinkinStars 0ad4defb6b feat(file): implement file download functionality 2024-12-09 11:52:18 +08:00
LinkinStars 43a474b417 feat(storage): add upload file condition to plugin upload 2024-12-09 11:52:18 +08:00
LinkinStars a955ba0658 feat(upload): add support for file attachments and enhance image upload 2024-12-09 11:52:18 +08:00
LinkinStars 0849e8f540 refactor(file): refactor file format check function 2024-01-30 16:36:39 +08:00
LinkinStars a458f3409c rename all old answerdev/answer link to apache/incubator-answer (#603)
Co-authored-by: shuai <lishuailing@sifou.com>
2023-11-01 14:48:35 +08:00
tison 3d2187d849 chore: add license headers
Signed-off-by: tison <wander4096@gmail.com>
2023-10-26 11:11:23 +08:00
LinkinStars a920e5c2c1 Merge remote-tracking branch 'origin/dev' into feat/1.2.0/question
# Conflicts:
#	internal/service/uploader/upload.go
2023-10-08 15:11:35 +08:00
Lev Zakharov 5ce5187422 refactor: close used resources 2023-10-07 18:41:55 +03:00
LinkinStars b2d5781633 feat(user): support upload webp image 2023-09-22 14:36:40 +08:00
LinkinStars ad6e282416 feat(upload): support upload gif image 2023-09-20 11:37:42 +08:00
LinkinStars 3c4c91b2aa fix(upload): Use the correct upload type 2023-08-02 17:27:42 +08:00
LinkinStars 42c08fe566 refactor(uploader): refactor AvatarThumbFile service 2023-06-13 17:38:22 +08:00
LinkinStars 1c2151d710 refactor(shortid): remove short id variable 2023-06-02 16:53:49 +08:00
LinkinStars 7662e9a552 refactor(upload): extract uploader service interface 2023-05-31 16:25:47 +08:00
LinkinStars 759f1491c9 Merge branch 'github-main' into beta/1.1.0
# Conflicts:
#	Makefile
#	cmd/answer/main.go
#	go.mod
#	go.sum
#	internal/base/reason/reason.go
#	internal/service/uploader/upload.go
#	ui/src/utils/common.ts
2023-04-11 11:28:57 +08:00
aichy126 ac3f2f047e remove exif 2023-03-23 11:52:28 +08:00
LinkinStars 1f05338aae fix(plugin): Add storage plugin interface 2023-03-08 16:29:55 +08:00
LinkinStars 964e6bd2d4 fix(upload): add image file check 2023-02-06 19:04:05 +08:00
LinkinStar 6e1f4841f1 style(simple): Properly handle unhandled errors 2022-12-16 16:35:55 +08:00
LinkinStar 3a817bb6c8 fix: rename icon ext is ico 2022-11-16 10:58:17 +08:00
LinkinStar 70842e18d8 feat: branding support upload icon image 2022-11-15 15:20:41 +08:00
LinkinStar f6fa850aa0 feat: unified file upload interface 2022-11-14 16:27:10 +08:00
LinkinStar 498b7f4893 fix: upload add siteinfo service 2022-11-09 17:42:10 +08:00
LinkinStar 9509a9a964 feat: change site url from config file to database 2022-11-09 11:00:34 +08:00
aichy126 1563c6b583 update avatar img size 2022-10-28 11:15:46 +08:00
aichy126 7496897855 fix img upload 2022-10-28 10:43:53 +08:00
aichy126 8b399dbe66 update img upload 2022-10-28 10:29:26 +08:00
aichy126 bab71a28eb fix AvatarThumbFile 2022-10-28 09:52:10 +08:00
aichy126 a4c7517280 add avatar Thumbnail image
add avatar Thumbnail image
2022-10-27 22:01:53 +08:00
aichy126 3f48de2fe9 add avatar middleware 2022-10-27 18:09:27 +08:00
LinkinStar 43cc77f9d4 Merge branch 'github-main' into pr/github 2022-10-25 10:39:28 +08:00
K8sCat f77e455e27 update(pkg): make functions in dir more clear
Signed-off-by: K8sCat <k8scat@gmail.com>
2022-10-25 10:31:54 +08:00
LinkinStar adc760e874 refactor: rename go mod package to answerdev 2022-10-24 16:51:05 +08:00
mingcheng 8e6c49a531 initial commit 2022-09-27 17:59:05 +08:00