TransparentLC / cloud-clipboard

在局域网内自用的在线剪贴板,支持传输纯文本和文件
https://try-clipboard.akarin.dev/
MIT License
310 stars 48 forks source link

server-node may leak cache file at start #49

Closed yurenchen000 closed 1 week ago

yurenchen000 commented 1 week ago
  1. when load from history.json to uploadFileMap at server start it ignore expired files. https://github.com/TransparentLC/cloud-clipboard/blob/70c90c2/server-node/app/http-router.js#L267

  2. clean expired files only from uploadFileMap https://github.com/TransparentLC/cloud-clipboard/blob/70c90c2/server-node/app/uploaded-file.js#L63

  3. if server Stopped for a while, files that expire during this period will not be cleaned up. then these files will be leaked.