首先,我使用InstaSharper登录。我试着通过这个代码上传带有标题的照片。
var mediaImage = new InstaImage
{
Height = 1080,
Width = 1080,
URI = new Uri(
Path.GetFullPath("image.jpg"), UriKind.Absolute).LocalPath
};
var r = await api.UploadPhotoAsync(mediaImage, "caption
当用户终止应用程序时,如何将图像上载到Firebase存储?
下面是我的代码:
firebaseRef.child("\(uid)/\(filePath)").put(data, metadata: metadata) { (metadata, error) in
// NOTE: This spot never reaches when user closes the app
if error != nil || metadata == nil {
log.error("Fail to store image in cloud storage&