In the era of Industry 4.0, distributed storage systems face significant challenges in terms of reliability, data security, privacy, and maintenance. While traditional solutions like HDFS rely on centralized nodes that create single points of failure, existing blockchain-based alternatives often lack efficient mechanisms to dynamically evaluate node reliability in untrusted environments, leading to potential data unavailability.This study introduces a secure, blockchain-based distributed storage system using the Trusted Adaptive File Allocation (TAFA) Algorithm for efficient file distribution. The system uses smart contracts to automatically incentivize and monitor nodes, rewarding or penalizing them to boost long-term availability. Extensive simulation experiments demonstrate that this system achieves an optimal Load Balance Factor (LBF) of nearly 1.00 and maintains high storage reliability. It is noteworthy that, even in environments with up to 90% malicious nodes performing tampering or denial-of-service attacks, the file availability of this system remains at least 30%, which is up to 5.7 times higher than that of other distributed storage algorithms.