web client: add share mode read/write

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-05-09 19:09:43 +02:00
parent e72bb1e124
commit 1e0b3a2a8c
22 changed files with 457 additions and 108 deletions

View File

@@ -6,8 +6,10 @@ import (
"crypto/rand"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"io"
"io/fs"
"net"
"net/http"
"os"
@@ -2916,7 +2918,7 @@ func getExitCodeScriptContent(exitCode int) []byte {
func createTestFile(path string, size int64) error {
baseDir := filepath.Dir(path)
if _, err := os.Stat(baseDir); os.IsNotExist(err) {
if _, err := os.Stat(baseDir); errors.Is(err, fs.ErrNotExist) {
err = os.MkdirAll(baseDir, os.ModePerm)
if err != nil {
return err