mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Config: Add StaticBuildFile() and StaticImgFile() functions #5274
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -38,3 +38,9 @@ const (
|
||||
UsersDir = "users"
|
||||
ZipDir = "zip"
|
||||
)
|
||||
|
||||
// Common file names used across packages (sorted by name).
|
||||
const (
|
||||
AppJsFile = "app.js"
|
||||
SwJsFile = "sw.js"
|
||||
)
|
||||
|
||||
@@ -28,6 +28,8 @@ func TestContent(t *testing.T) {
|
||||
assert.Equal(t, "multipart/form-data", ContentTypeMultipart)
|
||||
assert.Equal(t, "application/json", ContentTypeJson)
|
||||
assert.Equal(t, "application/json; charset=utf-8", ContentTypeJsonUtf8)
|
||||
assert.Equal(t, "application/javascript", ContentTypeJavaScript)
|
||||
assert.Equal(t, "text/css", ContentTypeCSS)
|
||||
assert.Equal(t, "text/html; charset=utf-8", ContentTypeHtml)
|
||||
assert.Equal(t, "text/plain; charset=utf-8", ContentTypeText)
|
||||
assert.Equal(t, "image/png", ContentTypePng)
|
||||
|
||||
@@ -101,6 +101,8 @@ const (
|
||||
ContentTypeMultipart = "multipart/form-data"
|
||||
ContentTypeJson = "application/json"
|
||||
ContentTypeJsonUtf8 = "application/json; charset=utf-8"
|
||||
ContentTypeJavaScript = "application/javascript"
|
||||
ContentTypeCSS = "text/css"
|
||||
ContentTypeXml = "text/xml"
|
||||
ContentTypeHtml = "text/html; charset=utf-8"
|
||||
ContentTypeText = "text/plain; charset=utf-8"
|
||||
|
||||
Reference in New Issue
Block a user