Code Monkey home page Code Monkey logo

opensource-filemanager's Introduction


 root@github ~$ go build -o build src/narukoshin.go
 root@github ~$ chmod +x build/narukoshin
 root@github ~$ ./build/narukoshin
{
  "name": "narukoshin",
  "age": 23,
  "hobbies": [
    "๐Ÿ‘จโ€๐Ÿ’ป programming",
    "๐Ÿ˜พ hacking websites and systems",
    "๐Ÿคณ taking pictures",
    "๐ŸŽน making music",
    "๐ŸŽธ playing guitar",
    "๐Ÿ•น playing video games",
    "๐Ÿคธ sport"
  ],
  "languages": [
    "english",
    "russian",
    "japanese",
    "latvian"
  ],
  "programming_languages": [
    "PHP",
    "JavaScript",
    "Python",
    "C++",
    "Go"
  ],
  "linux_distros": {
    {"name": "Arch", "desc": "for penetration testing, daily life"},
    {"name": "Ubuntu", "desc": "for web servers"}
  }
}

opensource-filemanager's People

Contributors

narukoshin avatar

Stargazers

 avatar

Watchers

 avatar

opensource-filemanager's Issues

Better Date formatting

Formatting a date like this looks a little bit boring.

If the file is created today, then the date value will be Today, but if yesterday, then Yesterday.
And only if the file will be more than 2 days old, it will show the actual date.

image

Log files aren't created on a new day.

When the server is working without restarts, at the start of a new day, there's no new log file created and logs are still going to a previous log file.

image

Create a README.MD

There should be a README file that will contain some information about the project, simple documentation, etc.

Password protected folders

Sometimes there are files that are not meant for everyone to see.
A good feature would be to create password-protected folders and the files should be encrypted.

Download isn't working anymore

After some updates, the download function stopped working with the error that Content-Length is more than the actual data.

[martini] 2023/02/09 09:00:46 PANIC: http: wrote more than the declared Content-Length

Let's investigate, where the bug is hiding.

Logger is opening too many files

After implementing the #3 feature, a new bug appeared.

panic: open app/logs/logs_2023_02_08.log: too many open files

This error message says that it tries to open many files with the same name.

go func(){
    for {
	time.Sleep(time.Until(time.Now().Truncate(24 * time.Hour)))
	// It will create a new file every day
	file_name := fmt.Sprintf("logs_%s.log", time.Now().Format("2006_01_02"))
	f, err = os.OpenFile(filepath.Join(config.LogsFolder, file_name), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
	if err != nil {
		panic(err)
	}
...

Error message appears because file opening happens in the for loop

Create API

Create a multi-functional API for creating/deleting files and folders and easier managing files.

End-point to create a new folder should be like this:

> request
POST /api/v1/folder
> data
{ "folder_name": "name" }

To delete the folder:

> request
DELETE /api/v1/folder
> data
{ "folder_name": "name" }

Hidden temp file while uploading

While file uploading the main problem is that the file that is uploading at the moment is visible and is not finished uploading.
Everyone can start downloading the uncompleted file, to avoid that, I need to write the file to a hidden temp file before and when the upload is completely finished, make it visible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.