mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 07:37:28 -06:00
fileserver working
This commit is contained in:
parent
7ab9e78b44
commit
2fa5519d55
18 changed files with 480 additions and 133 deletions
|
|
@ -28,7 +28,7 @@ func (s *localStorage) StoreFileAt(path string, data []byte) error {
|
|||
l := s.log.WithField("func", "StoreFileAt")
|
||||
l.Debugf("storing at path %s", path)
|
||||
components := strings.Split(path, "/")
|
||||
dir := strings.Join(components[0:len(components) - 1], "/")
|
||||
dir := strings.Join(components[0:len(components)-1], "/")
|
||||
if err := os.MkdirAll(dir, 0777); err != nil {
|
||||
return fmt.Errorf("error writing file at %s: %s", path, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue