Ios 如何在dropbox xamarin中保存图像或文件?
我正在尝试在dropbox中保存文档,我已将文档保存在设备上。以及从我的应用程序在dropbox中保存UIImageIos 如何在dropbox xamarin中保存图像或文件?,ios,xamarin.ios,components,xamarin,dropbox,Ios,Xamarin.ios,Components,Xamarin,Dropbox,我正在尝试在dropbox中保存文档,我已将文档保存在设备上。以及从我的应用程序在dropbox中保存UIImage DBError error; string ruta = Environment.GetFolderPath (Environment.SpecialFolder.Personal); string rutaarchivo = Path.Combine(ruta,"Geodesia.xml"); DBPath newPat
DBError error;
string ruta = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
string rutaarchivo = Path.Combine(ruta,"Geodesia.xml");
DBPath newPath = DBPath.Root.ChildPath(rutaarchivo);
DBFile archivo = DBFilesystem.SharedFilesystem.CreateFile (newPath,out error);
我正在使用此代码,但只创建文件,有人帮我吗???根据,CreateFile只打开文件。您需要使用WriteContentsOfFile将其他文件的内容复制到其中
例如:
archivo.WriteContentsOfFile(rutaarchivo, false);
谢谢你的帮助,我找到了另一种方法,我用这段代码为image archivo.WriteData image.AsPNG,out error;这是文件archivo.WriteData rutaachivo的输出错误;祝您有个美好的一天!!