Java implementation of a simple file storage system

Source: Internet
Author: User
Tags ftp client

Recently idle boring, time to implement a simple file storage system, the use of FTP functions, can be stored in different file servers.


Git url:https://git.oschina.net/lkclkc88/filestore.git


The basic principle of implementation is to generate a random name (UUID), and then the file name to do a fragmented (fragmented number) hash, to calculate the file storage fragmentation, and then through the FTP node configuration to find fragmented storage FTP location, through the FTP client, upload files to the FTP server, The storage path is {rootpath}/{yyyy_mm}/fragment/filename. and play the file path


Download is the same rule, through the file path to find the location of the FTP node storage, and finally through the FTP node to download files.

It may be more efficient to provide file downloads on an FTP server, by installing Nginx/apache, in actual use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.