MCPcopy Create free account
hub / github.com/cli/cli / UserAssetUploadPrefix

Function UserAssetUploadPrefix

internal/ghinstance/host.go:95–100  ·  view source on GitHub ↗

UserAssetUploadPrefix returns the URL prefix for user asset uploads. GHES does not support this endpoint.

(hostname string)

Source from the content-addressed store, hash-verified

93// UserAssetUploadPrefix returns the URL prefix for user asset uploads.
94// GHES does not support this endpoint.
95func UserAssetUploadPrefix(hostname string) string {
96 if strings.EqualFold(hostname, localhost) {
97 return fmt.Sprintf("http://uploads.%s/", hostname)
98 }
99 return fmt.Sprintf("https://uploads.%s/", hostname)
100}
101
102func HostPrefix(hostname string) string {
103 if strings.EqualFold(hostname, localhost) {

Callers 2

postAssetMethod · 0.92

Calls

no outgoing calls

Tested by 1