diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index bc7609711..f8ae20440 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2433,6 +2433,7 @@ md5_computing = MD5 computing loading_file = Loading uploading = Uploading upload_complete = Uploading complete +enable_minio_support = Enable minio support to use the dataset service [notification] notifications = Notifications diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index b45f5c3c5..5f4dbf949 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -2434,6 +2434,7 @@ md5_computing=计算MD5 loading_file=加载文件 uploading=正在上传 upload_complete=上传完成 +enable_minio_support=启用minio支持以使用数据集服务 [notification] notifications=通知 diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index 879f779c6..962824bd0 100644 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -1,18 +1,15 @@ package repo import ( - "net/url" "sort" - "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" - - gouuid "github.com/satori/go.uuid" ) const ( @@ -82,18 +79,8 @@ func DatasetIndex(ctx *context.Context) { ctx.Data["dataset"] = dataset ctx.Data["Attachments"] = attachments ctx.Data["IsOwner"] = true - uuid := gouuid.NewV4().String() - tmpUrl, err := storage.Attachments.PresignedPutURL(models.AttachmentRelativePath(uuid)) - if err != nil { - ctx.ServerError("PresignedPutURL", err) - } - preUrl, err := url.QueryUnescape(tmpUrl) - if err != nil { - ctx.ServerError("QueryUnescape", err) - } + ctx.Data["StoreType"] = setting.Attachment.StoreType - ctx.Data["uuid"] = uuid - ctx.Data["url"] = preUrl renderAttachmentSettings(ctx) ctx.HTML(200, tplIndex) diff --git a/templates/repo/datasets/dataset.tmpl b/templates/repo/datasets/dataset.tmpl old mode 100755 new mode 100644 index 8ea4d9f64..9e533acd3 --- a/templates/repo/datasets/dataset.tmpl +++ b/templates/repo/datasets/dataset.tmpl @@ -2,7 +2,8 @@