refactor: fix go lint
This commit is contained in:
parent
fde88fe7e4
commit
3543eab26b
@ -2,13 +2,14 @@ package http
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gorilla/mux"
|
|
||||||
"image"
|
"image"
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/disintegration/imaging"
|
"github.com/disintegration/imaging"
|
||||||
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/files"
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
)
|
)
|
||||||
@ -58,7 +59,7 @@ var previewHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *da
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
func handleImagePreview(w http.ResponseWriter, file *files.FileInfo, size string) (int, error) {
|
func handleImagePreview(w io.Writer, file *files.FileInfo, size string) (int, error) {
|
||||||
var imgProcessor imageProcessor
|
var imgProcessor imageProcessor
|
||||||
switch size {
|
switch size {
|
||||||
case sizeBig:
|
case sizeBig:
|
||||||
Loading…
Reference in New Issue
Block a user