gpt4 book ai didi

android - 火力地堡 : How to check file already exist before Upload files

转载 作者:行者123 更新时间:2023-11-29 14:43:13 26 4
gpt4 key购买 nike

<分区>

我使用 firebase 存储作为云存储

上传文件时,如果文件已存在于存储引用中,我不想上传。我只需要跳过上传并继续下一个文件。

目前我是这样上传的

    String pathString = "/Files/" + filename;                        
StorageReference filepathReference = rootreference.child(pathString);
StorageReference uploadRef = filepathReference.child(pathString);
UploadTask uploadTask = uploadRef.putFile(file);

如果文件已经存在,显然会再次上传并替换。我只想通过检查存储桶中已存在的文件名来跳过不需要的上传。那可能吗?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com