大家好,我一直在使用iPhone 4s
我使用ifileexplorer下载了文件(.doc),我可以在我的iPhone上看到该文件。我需要将该文件发送给我的朋友,以便我撰写gmail点击附加文件我只能看到照片,我我没有得到文件档案。
我如何将文件上传到Gmail,我是否需要安装更多。我已经搜索了很长时间但我没有找到上传文件的最佳方法。我已经尝试安装各种应用程序,如文件,ifileexplorer保存但无法从此上传
请帮助我解决这个问题
答案 0 :(得分:0)
我认为这段代码对你有帮助......
NSData *attachment = [NSData dataWithContentsOfURL:fileURL options:(NSDataReadingMapped|NSDataReadingUncached) error:nil];
if (attachment != nil) // Ensure that we have valid document file attachment data
{
MFMailComposeViewController *mailComposer = [MFMailComposeViewController new];
[mailComposer addAttachmentData:attachment mimeType:@"application/pdf" fileName:fileName];
}