Browse Source

download link

tags/v1.22.2.2^2
lewis 4 years ago
parent
commit
f7b4d218a8
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      models/attachment.go
  2. +1
    -1
      templates/repo/datasets/dataset_list.tmpl

+ 1
- 1
models/attachment.go View File

@@ -94,7 +94,7 @@ func (a *Attachment) APIFormat() *api.Attachment {

// DownloadURL returns the download url of the attached file
func (a *Attachment) DownloadURL() string {
return fmt.Sprintf("%sattachments/%s", setting.AppURL, a.UUID)
return fmt.Sprintf("%sattachments/%s?type=%d", setting.AppURL, a.UUID, a.Type)
}

// DownloadURL returns the download url of the attached file


+ 1
- 1
templates/repo/datasets/dataset_list.tmpl View File

@@ -14,7 +14,7 @@
<div class="eight wide column right aligned">
<div class="ui left mini icon buttons">
<span class="ui basic button text left" data-tooltip='{{$.i18n.Tr "dataset.download_count"}}' data-position="bottom right" style="width: 60px; padding-left: 0;">{{svg "octicon-flame" 16}} {{(.DownloadCount | PrettyNumber)}}</span>
<span class="ui basic basic button clipboard" data-clipboard-text="{{.S3DownloadURL}}" data-tooltip='{{$.i18n.Tr "dataset.copy_url"}}' data-clipboard-action="copy">{{svg "octicon-file" 16}}</span>
<span class="ui basic basic button clipboard" data-clipboard-text="{{.DownloadURL}}" data-tooltip='{{$.i18n.Tr "dataset.copy_url"}}' data-clipboard-action="copy">{{svg "octicon-file" 16}}</span>
<span class="ui basic basic button clipboard" data-clipboard-text="{{.FileChunk.Md5}}" data-tooltip='{{$.i18n.Tr "dataset.copy_md5"}}' data-clipboard-action="copy">{{svg "octicon-file-binary" 16}}</span>
</div>
{{if eq .DecompressState 1}}


Loading…
Cancel
Save