0

Hi everyone i have been working on iPhone 4s

I have downloaded file (.doc) using ifileexplorer and i can see that file on my iPhone .I need to send that document to my friend ,so that i compose gmail tap on attach a file i can see only photos ,i'm not getting document file .

How can i upload document to gmail ,do i need to install anything more .i have been searching this for a long time but i didn't found best way to upload file .i have tried installing various apps like files, ifileexplorer to save but cannot upload from this

please help me out from this

user2197875
  • 171
  • 3
  • 12

1 Answers1

0

I think this code help's you...

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];
        }
iosLearner
  • 1,312
  • 1
  • 16
  • 30