我试图在Dropbox中保存文档,我已将文档保存在设备上。以及从我的应用程序中保存Dropbox中的UIImage。
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);
我使用此代码但只创建文件,有人帮助我吗?
答案 0 :(得分:0)
根据Dropbox API Documentation,CreateFile
仅打开文件。您需要使用WriteContentsOfFile
将其他文件的内容复制到其中。
例如:
archivo.WriteContentsOfFile(rutaarchivo, false);