Compare commits

..
Author SHA1 Message Date
Ironic 1d8c74dbd9 Remove unstable version warning from README (#1512) 2025-11-04 08:05:18 -05:00
0ab22e3a89 Beta/v1.0.1 (#1500)
Co-authored-by: Pyro <pyrodd@gmail.com>
Co-authored-by: Kevin B. <kurami32_kbm@proton.me>
Co-authored-by: lps-rocks <10893911+lps-rocks@users.noreply.github.com>
Co-authored-by: contributor <foss.contributor@gmail.com>
Co-authored-by: Sarabanga <96509626+Sarabanga@users.noreply.github.com>
2025-11-02 15:40:06 -06:00
23 changed files with 59 additions and 161 deletions

No files matched your search

+2 -24
View File
@@ -2,29 +2,7 @@
All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version).
## v1.0.2-stable
**Notes**:
- [docker] upgraded ffmpeg 8.0 to 8.0.1
**BugFixes**:
- added missing exiftool to docker image for heic conversion orientation support
- Uploading a file will silently overwrite any existing file with the same name #1564
- Unable to download folder as ZIP #1604
- issues downloading and file actions on password protected share
## v1.0.1-stable
**BugFixes**:
- UserDefault always applies to newly created users #1518
- Updating user's own password sometimes doesn't work
- Anonymous Share link with optional password does not allow downloads #1553
- Share options should go in the meta tags #1511
- Unable to select compression format when downloading multiple files/dir via Share link (v1.0.0) #1557
- fixed sidebar clipping on some browsers like safari
- Files show as Download is not available even though it is #1537
## v1.0.1-beta & v1.0.0-stable
## v1.0.1
**New Features**:
- login icon support added via `frontend.loginIcon` config path variable
@@ -49,7 +27,7 @@ All notable changes to this project will be documented in this file. For commit
- fixed some condition that the halloween background doesn't load properly
- some comments not showing up on config viewer in settings
## v1.0.0-beta
## v1.0.0
**Notes**:
- Enhanced onlyoffice debugger with more wholistic backend logs
+4 -6
View File
@@ -1,4 +1,4 @@
FROM gtstef/ffmpeg:8.0.1-decode AS ffmpeg
FROM gtstef/ffmpeg:8.0-decode AS ffmpeg
FROM golang:alpine AS base
ARG VERSION
ARG REVISION
@@ -13,7 +13,7 @@ RUN go build -tags mupdf,musl -ldflags="-w -s \
-o filebrowser .
RUN upx filebrowser
FROM node:jod-slim AS nbuild
FROM node:lts-slim AS nbuild
WORKDIR /app
COPY ./frontend/package.json ./
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates \
@@ -28,21 +28,19 @@ COPY --from=ffmpeg [ "/ffmpeg", "/ffprobe", "/usr/local/bin/" ]
ENV FILEBROWSER_FFMPEG_PATH="/usr/local/bin/"
ENV FILEBROWSER_DATABASE="/home/filebrowser/data/database.db"
ENV PATH="$PATH:/home/filebrowser"
RUN apk --no-cache add ca-certificates mailcap tzdata curl exiftool
RUN apk --no-cache add ca-certificates mailcap tzdata curl
RUN adduser -D -s /bin/true -u 1000 filebrowser
USER filebrowser
WORKDIR /home/filebrowser
# copy config to two locations for compatibility
COPY --from=base --chown=filebrowser:1000 [ "/app/filebrowser", "./" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/filebrowser", "/app/config.yaml", "./" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/config.yaml", "./data/config.yaml" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/config.yaml", "./" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/reduce-rounded-corners.css", "./" ]
COPY --from=nbuild --chown=filebrowser:1000 [ "/app/dist/", "./http/dist/" ]
## sanity checks
RUN [ "filebrowser", "version" ]
RUN [ "ffmpeg", "-version" ]
RUN [ "ffprobe", "-version" ]
RUN [ "exiftool", "-ver" ]
USER root
# exposing default port for auto discovery.
EXPOSE 80
-1
View File
@@ -30,7 +30,6 @@ USER filebrowser
WORKDIR /home/filebrowser
COPY --from=base --chown=filebrowser:1000 [ "/app/filebrowser", "./" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/config.yaml", "./data/config.yaml" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/config.yaml", "./" ]
COPY --from=base --chown=filebrowser:1000 [ "/app/reduce-rounded-corners.css", "./" ]
COPY --from=nbuild --chown=filebrowser:1000 [ "/app/dist/", "./http/dist/" ]
## sanity checks
+1 -1
View File
@@ -112,7 +112,7 @@ func runCLI() bool {
}
newUser.Permissions = settings.Config.UserDefaults.Permissions
newUser.Permissions.Admin = asAdmin
err = storage.CreateUser(newUser, newUser.Permissions)
err = storage.CreateUser(newUser)
if err != nil {
logger.Errorf("could not create user: %v", err)
}
+3 -7
View File
@@ -7,7 +7,6 @@ import (
"strings"
"time"
"github.com/gtsteffaniak/filebrowser/backend/common/settings"
"github.com/gtsteffaniak/filebrowser/backend/common/version"
"github.com/gtsteffaniak/go-logger/logger"
"golang.org/x/mod/semver"
@@ -31,9 +30,6 @@ func CheckForUpdates() (updateInfo, error) {
repoOwner := "gtsteffaniak"
repoName := "filebrowser"
currentVersion := version.Version
if currentVersion == "untracked" || currentVersion == "testing" || currentVersion == "" || settings.Config.Env.IsDevMode {
return updateInfo{}, nil
}
splitVersion := strings.Split(currentVersion, "-")
versionCategory := "stable"
if len(splitVersion) > 1 {
@@ -55,13 +51,13 @@ func CheckForUpdates() (updateInfo, error) {
if err := json.NewDecoder(resp.Body).Decode(&tags); err != nil {
return updateInfo{}, err
}
// Find the latest version greater than the current one that matches the version category
// Find the latest beta version greater than the current one
var NewVersion string
for _, tag := range tags {
// Check if the version is valid and the prerelease contains the version category
// Check if the version is valid, is a pre-release, and contains "beta"
if semver.IsValid(tag.Name) && strings.Contains(semver.Prerelease(tag.Name), versionCategory) {
// Check if this tag is greater than the current version
// and also greater than any other version we've found so far
// and also greater than any other beta version we've found so far
if semver.Compare(tag.Name, currentVersion) > 0 {
if NewVersion == "" || semver.Compare(tag.Name, NewVersion) > 0 {
NewVersion = tag.Name
-4
View File
@@ -84,10 +84,6 @@ func (st usersBackend) Update(user *users.User, actorIsAdmin bool, fields ...str
return err
}
if user.LoginMethod == "" {
user.LoginMethod = existingUser.LoginMethod
}
if !slices.Contains(fields, "Password") {
user.Password = existingUser.Password
} else {
+1 -3
View File
@@ -107,7 +107,7 @@ func quickSetup(store *bolt.BoltStore) {
}
// create new user
func CreateUser(userInfo users.User, permissions users.Permissions) error {
func CreateUser(userInfo users.User) error {
newUser := &userInfo
newUser.ShowFirstLogin = settings.Config.Env.IsFirstLoad && newUser.Permissions.Admin
if userInfo.LoginMethod == "password" {
@@ -125,8 +125,6 @@ func CreateUser(userInfo users.User, permissions users.Permissions) error {
if userInfo.Username == "" {
return fmt.Errorf("username is required to create a user")
}
settings.ApplyUserDefaults(newUser)
newUser.Permissions = permissions
logger.Debugf("Creating user: %v %v", userInfo.Username, userInfo.Scopes)
// create new home directories
err := userStore.Save(newUser, true, false)
+3 -2
View File
@@ -84,7 +84,7 @@ func setupProxyUser(r *http.Request, data *requestContext, proxyUser string) (*u
if user.Username == config.Auth.AdminUsername {
user.Permissions.Admin = true
}
err = storage.CreateUser(user, user.Permissions)
err = storage.CreateUser(user)
if err != nil {
return nil, err
}
@@ -223,7 +223,8 @@ func signupHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (i
},
LoginMethod: users.LoginMethodPassword,
}
err := storage.CreateUser(user, settings.Config.UserDefaults.Permissions)
user.Permissions = settings.Config.UserDefaults.Permissions
err := storage.CreateUser(user)
if err != nil {
logger.Debug(err.Error())
// Return the actual error message instead of a generic one
+1 -1
View File
@@ -300,7 +300,7 @@ func loginWithOidcUser(w http.ResponseWriter, r *http.Request, username string,
if isAdmin {
user.Permissions.Admin = true
}
err = storage.CreateUser(*user, user.Permissions)
err = storage.CreateUser(*user)
if err != nil {
return http.StatusInternalServerError, err
}
+1 -6
View File
@@ -378,12 +378,7 @@ func resourcePostHandler(w http.ResponseWriter, r *http.Request, d *requestConte
}
fileInfo, err := files.FileInfoFaster(fileOpts, accessStore)
if err == nil { // File exists
if r.URL.Query().Get("override") != "true" {
logger.Debugf("resource already exists: %v", fileInfo.RealPath)
return http.StatusConflict, nil
}
// If overriding, delete existing thumbnails
if err != nil {
preview.DelThumbs(r.Context(), *fileInfo)
}
err = files.WriteFile(fileOpts.Source, fileOpts.Path, r.Body)
+4 -6
View File
@@ -70,8 +70,6 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
defaultThemeColor := "#455a64"
staticURL := config.Server.BaseURL + "public/static"
description := config.Frontend.Description
title := config.Frontend.Name
// Use custom favicon if configured and validated, otherwise fall back to default
var favicon string
@@ -150,10 +148,10 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
}
}
if d.share.Description != "" {
description = d.share.Description
data["description"] = d.share.Description
}
if d.share.Title != "" {
title = d.share.Title
data["title"] = d.share.Title
}
if d.share.ShareTheme != "" {
theme, ok := config.Frontend.Styling.CustomThemeOptions[d.share.ShareTheme]
@@ -178,7 +176,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
loginIcon := staticURL + "/loginIcon"
data["htmlVars"] = map[string]interface{}{
"title": title,
"title": config.Frontend.Name,
"customCSS": config.Frontend.Styling.CustomCSSRaw,
"userSelectedTheme": userSelectedTheme,
"lightBackground": config.Frontend.Styling.LightBackground,
@@ -190,7 +188,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
"color": defaultThemeColor,
"winIcon": staticURL + "/img/icons/mstile-144x144.png",
"appIcon": staticURL + "/img/icons/android-chrome-256x256.png",
"description": description,
"description": config.Frontend.Description,
}
// variables consumed by frontend as json
data["globalVars"] = map[string]interface{}{
+1 -1
View File
@@ -164,7 +164,7 @@ func usersPostHandler(w http.ResponseWriter, r *http.Request, d *requestContext)
return http.StatusBadRequest, errors.ErrEmptyPassword
}
err = storage.CreateUser(req.User, req.User.Permissions)
err = storage.CreateUser(req.User)
if err != nil {
return http.StatusInternalServerError, err
}
+7 -47
View File
@@ -1,6 +1,6 @@
import { fetchURL, adjustedData } from './utils'
import { getApiPath, doubleEncode, getPublicApiPath } from '@/utils/url.js'
import { mutations,state } from '@/store'
import { mutations } from '@/store'
import { notify } from '@/notify'
import { globalVars } from '@/utils/constants'
@@ -85,7 +85,7 @@ export async function put(source, path, content = '') {
}
}
export async function download(format, files, shareHash = "") {
export function download(format, files, shareHash = "") {
if (format !== 'zip') {
format = 'tar.gz'
}
@@ -101,57 +101,17 @@ export async function download(format, files, shareHash = "") {
const apiPath = getApiPath(shareHash == "" ? 'api/raw' : 'public/api/raw', {
files: fileargs,
algo: format,
hash: shareHash,
...(state.share.token && { token: state.share.token })
hash: shareHash
})
const url = window.origin + apiPath
// Use fetch to capture errors in the console
const response = await fetch(url, {
credentials: 'same-origin',
headers: {
"sessionId": state.sessionId,
},
})
if (!response.ok) {
const errorText = await response.text()
const error = new Error(`Download failed: ${response.status} ${response.statusText}`)
console.error('Download API error:', {
status: response.status,
statusText: response.statusText,
body: errorText,
url: url
})
throw error
}
// Get the blob from the response
const blob = await response.blob()
// Determine filename from Content-Disposition header or use default
let filename = 'download'
const contentDisposition = response.headers.get('Content-Disposition')
if (contentDisposition) {
const filenameMatch = contentDisposition.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/)
if (filenameMatch && filenameMatch[1]) {
filename = filenameMatch[1].replace(/['"]/g, '')
}
} else {
// Fallback: use format extension
filename = `download.${format}`
}
// Create a blob URL and trigger download
const blobUrl = window.URL.createObjectURL(blob)
// Create a temporary <a> element to trigger the download
const link = document.createElement('a')
link.href = blobUrl
link.setAttribute('download', filename)
link.href = url
link.setAttribute('download', '') // Ensures it triggers a download
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
// Clean up the blob URL
window.URL.revokeObjectURL(blobUrl)
document.body.removeChild(link) // Clean up
}
export function post(
-10
View File
@@ -117,10 +117,6 @@ export function post(
if (!hash || hash === undefined || hash === null) {
throw new Error('no hash provided')
}
let sharePassword = localStorage.getItem("sharepass:" + hash);
if (sharePassword) {
headers["X-SHARE-PASSWORD"] = sharePassword;
}
try {
const apiPath = getPublicApiPath("resources", {
targetPath: doubleEncode(path),
@@ -188,17 +184,11 @@ async function resourceAction(path, method, content) {
throw new Error('invalid share')
}
try {
let headers = {};
let sharePassword = localStorage.getItem("sharepass:" + shareInfo.hash);
if (sharePassword) {
headers["X-SHARE-PASSWORD"] = sharePassword;
}
path = doubleEncode(path)
const apiPath = getPublicApiPath('resources', { path, hash: shareInfo.hash, token: shareInfo.token })
const response = await fetch(apiPath, {
method,
body: content,
headers,
});
if (!response.ok) {
const error = new Error(response.statusText);
+1 -1
View File
@@ -261,7 +261,7 @@ export default {
// Add keyboard event listener for "/" to activate search
this.handleKeydown = (event) => {
if (event.key === '/' && !state.isSearchActive && getters.currentPrompt() === null) {
if (event.key === '/' && !state.isSearchActive) {
event.preventDefault();
this.open();
}
@@ -27,8 +27,7 @@
</div>
<div v-if="!shareInfo.disableDownload" class="share__box__element share__box__center">
<button class="button button--flat clickable" @click="goToDownload()"> {{ $t("buttons.download") }}
</button>
<button class="button button--flat clickable" @click="goToDownload()"> {{ $t("buttons.download") }} </button>
</div>
</div>
@@ -42,7 +41,7 @@
<script>
import { publicApi } from "@/api";
import { state, getters, mutations } from "@/store";
import { state, getters } from "@/store";
import { getHumanReadableFilesize } from "@/utils/filesizes";
import { getTypeInfo } from "@/utils/mimetype";
import QrcodeVue from "qrcode.vue";
@@ -116,29 +115,13 @@ export default {
},
methods: {
goToDownload() {
if (state.req.items.length > 1) {
mutations.showHover({
name: "download",
confirm: (format) => {
mutations.closeHovers();
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink + "&format=" + format, "_blank");
},
});
} else {
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink, "_blank");
}
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink, "_blank");
},
getShareLink() {
return publicApi.getShareURL({
+3 -1
View File
@@ -514,7 +514,9 @@ button.action {
}
.headline-card {
padding: 0.5em;
padding: 1em;
overflow: hidden !important;
min-height: fit-content;
}
.person-button {
+3 -13
View File
@@ -13,23 +13,13 @@ export default function downloadFiles(items) {
}
if (getters.isShare()) {
// Perform download without opening a new window
if (getters.isSingleFileSelected()) {
startDownload(null, items, state.share.hash);
} else {
// Multiple files download with user confirmation
mutations.showHover({
name: "download",
confirm: (format) => {
mutations.closeHovers();
startDownload(format, items, state.share.hash);
},
});
}
startDownload(null, items, state.share.hash);
return;
}
if (getters.isSingleFileSelected()) {
startDownload(null, items);
return;
} else {
// Multiple files download with user confirmation
mutations.showHover({
@@ -44,7 +34,7 @@ export default function downloadFiles(items) {
async function startDownload(config, files, hash = "") {
try {
await filesApi.download(config, files, hash);
filesApi.download(config, files, hash);
notify.showSuccess("Downloading...");
} catch (e) {
notify.showError(`Error downloading: ${e}`);
+3
View File
@@ -104,6 +104,7 @@ export default {
},
created() {
if (getters.eventTheme() === "halloween" && !localStorage.getItem("seenHalloweenMessage")) {
mutations.showHover({
name: "generic",
props: {
@@ -128,7 +129,9 @@ export default {
},
});
}
this.fetchData();
},
watch: {
$route: "fetchData",
+3
View File
@@ -967,6 +967,9 @@ export default {
mutations.setMultiple(val == true);
showMultipleSelection();
},
openSearch() {
this.currentPrompt = "search";
},
windowsResize: throttle(function () {
this.colunmsResize();
this.width = window.innerWidth;
+1 -1
View File
@@ -88,7 +88,7 @@ export default {
},
computed: {
permissions() {
return getters.permissions();
return state.user.permissions;
},
showImage() {
if (state.req.type == "image/heic" || state.req.type == "image/heif") {
@@ -27,4 +27,8 @@ test("share download multiple files", async ({ page, checkForErrors, context })
await page.locator('button[aria-label="Download"]').waitFor({ state: 'visible' });
await page.locator('button[aria-label="Download"]').click();
const popup2 = page.locator('#popup-notification-content');
await popup2.waitFor({ state: 'visible' });
await expect(popup2).toHaveText("Downloading...");
checkForErrors(0,1);
});
@@ -43,4 +43,8 @@ test("share download multiple files", async ({ page, checkForErrors, context })
await page.locator('button[aria-label="Download"]').waitFor({ state: 'visible' });
await page.locator('button[aria-label="Download"]').click();
const popup2 = page.locator('#popup-notification-content');
await popup2.waitFor({ state: 'visible' });
await expect(popup2).toHaveText("Downloading...");
checkForErrors(0,1); // redirect errors are expected
});