Arreglado fallo añadiendo imágenes

Las imágenes añadidas no aparecían sin reiniciar el servidor.
This commit is contained in:
danoloan 2022-02-11 19:52:56 +01:00
parent 4233703c50
commit 6fd66dbe26
1 changed files with 20 additions and 23 deletions

13
main.go
View File

@ -1,12 +1,14 @@
package main package main
import ( import (
"crypto/sha512"
"encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"html/template" "html/template"
"crypto/sha512"
"io" "io"
"io/ioutil" "io/ioutil"
"mime"
"net/http" "net/http"
"os" "os"
"os/exec" "os/exec"
@ -15,13 +17,11 @@ import (
"strings" "strings"
"sync" "sync"
"time" "time"
"encoding/hex"
"mime"
"github.com/google/uuid"
"github.com/gorilla/feeds"
"github.com/labstack/echo" "github.com/labstack/echo"
"github.com/labstack/echo/middleware" "github.com/labstack/echo/middleware"
"github.com/gorilla/feeds"
"github.com/google/uuid"
//"github.com/labstack/echo/middleware" //"github.com/labstack/echo/middleware"
) )
@ -146,9 +146,6 @@ func (list *entryMap) write() (err error) {
if err == nil { if err == nil {
err = ioutil.WriteFile(list.filename, data, 0644) err = ioutil.WriteFile(list.filename, data, 0644)
} }
if err == nil {
list.modtime = time.Now()
}
return return
} }