In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to understand the API provided by FastDFS, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
The API and brief description provided by FastDFS are as follows:
Upload: upload ordinary files, including master files
Upload_appender: upload appender files, which can be operated with append, modify and truncate later.
Upload_slave: uploading from files
Download: downloading files
Delete: deleting fil
Append: append content to the appender file
Modify: modifying the contents of appender files
Truncate: setting appender file siz
Set_metadata: setting file additional properties
Get_metadata: get file additional attributes
There are three most commonly used API for FastDFS: upload, download, and delete. In order to support master and slave files, two API, upload_appender and upload_slave, are differentiated.
After calling delete API to delete the file, the file will not be recovered. Please use it carefully.
A master-slave file is a set of files that are directly related to the filenames generated by FastDFS. Its typical application scenario is the picture thumbnail, which can take the original image as the master file and a series of thumbnails as the slave file.
Append the content to the appender type file through the append method, which can be used to incrementally upload the file. This API is usually used to implement the function of resuming large file breakpoint.
The modify method is only used in specific situations, such as concurrent upload of very large files.
Use the truncate method to change the file size, which is usually used to empty or make the file smaller, as well as to make the file larger. Using truncate to make the file smaller will cause the contents of the file to be truncated. Please use this feature carefully.
FastDFS supports storing file additional properties, and the attachment properties of a file will be saved as a separate file. It is a mainstream practice to save file additional properties in a KV system or database, and it is not recommended to use set_metadata and get_metadata API unless they are used in special situations.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.