|
|
|
@@ -214,7 +214,7 @@ func uploadAndUpdatePackage(packageID cdssdk.PackageID, objectIter iterator.Uplo |
|
|
|
func uploadFile(file io.Reader, uploadNode UploadNodeInfo) (string, error) { |
|
|
|
// 本地有IPFS,则直接从本地IPFS上传 |
|
|
|
if stgglb.IPFSPool != nil { |
|
|
|
logger.Infof("try to use local IPFS to upload file") |
|
|
|
logger.Debug("try to use local IPFS to upload file") |
|
|
|
|
|
|
|
// 只有本地IPFS不是存储系统中的一个节点,才需要Pin文件 |
|
|
|
fileHash, err := uploadToLocalIPFS(file, uploadNode.Node.NodeID, stgglb.Local.NodeID == nil) |
|
|
|
|