Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

バックエンドサーバーにMinioクライアント追加 #912

Merged
merged 8 commits into from
Jan 31, 2025

Conversation

Kubosaka
Copy link
Collaborator

対応Issue

resolve #0

概要

  • 購入報告APIからファイルアップロードをバックエンドサーバーでやった方がいいと感じたため、Minioクライアントを導入しました
  • ファイルアップロード用のAPI作成
    • POST /upload_file

画面スクリーンショット等

スクリーンショット 2025-01-18 10 24 47

テスト項目

  • swaggerからAPIをたたき、ファイルアップロードができるか確認する

備考

api/drivers/mc/mc.go Show resolved Hide resolved
api/drivers/mc/mc.go Show resolved Hide resolved
api/drivers/mc/mc.go Outdated Show resolved Hide resolved
api/externals/repository/object_upload_repository.go Outdated Show resolved Hide resolved
@Kubosaka Kubosaka self-assigned this Jan 19, 2025
// 画像をアップロード
func (or *objectUploadRepository) UploadFile(c context.Context, file *multipart.FileHeader) error {
size := file.Size
fileName := "/2024/receipts/" + file.Filename
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[imo]
https://qiita.com/ajitama/items/3a168ee249dcd115f9ca
これとかtimeとかで年度を勝手に取得できたらよさげだと思いました。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kubosaka Kubosaka requested a review from hikahana January 22, 2025 12:12
Copy link
Collaborator

@hikahana hikahana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kubosaka Kubosaka merged commit 1415653 into develop Jan 31, 2025
2 checks passed
@Kubosaka Kubosaka deleted the feat/kubosaka/intro-minio-client-go branch January 31, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants