Inspiration

My father's clients are heavy SharePoint users. They are uploading documents to SharePoint for receipt tracking and they usually take pictures of the receipts with their phone. There isn't a quick and easy way to upload the photo to SharePoint from your phone.

What it does

SharePoint File Uploader opens up the iPhone/iPad's file system to SharePoint. Now a iOS user can upload a document straight to their SharePoint document libraries quickly. Whether they use iCloud Drive, Box, DropBox, One Drive, Google Drive, or a combination of drives, the user can easily access any of their files and put them in SharePoint within seconds. The user can also upload a file to SharePoint via any app on the phone, even the Mail app, their browser or the Outlook app.

How I built it

I used the Microsoft Graph API to give the user access to their SharePoint document libraries. I access Sites, drives, and DriveItems. The file uploading is done via the Resumable Upload API for DriveItems.

I built SharePoint File Uploader UI using Apple's UIKit. The code is written in Swift. The user's OAuth tokens are stored securely in the device's Keychain.

Challenges I ran into

Using the Resumable Upload API on DriveItem was difficult. Most APIs I have worked with take a single request of bytes and then the request is done. Working with the raw data, chunking the data into smaller sizes, and sending those to the server in a way that works every time took a while to get right.

Accomplishments that I'm proud of

Creating a Share Extension on iOS is not trivial. A lot of thought has to go into how to share the OAuth access tokens between multiple applications. The reward of being able to share a file to SharePoint from anywhere in the iOS system is really cool. I think that feature will be life changing for SharePoint users.

What I learned

I learned the Microsoft Graph API is really nice to work with and opens up a bunch of possibilities for improving the lives of Microsoft users on iOS. I am excited to come up with more solutions to bring to iOS using the Microsoft Graph API.

What's next for SharePoint File Uploader

Currently the app only handles uploading images. SharePoint File Uploader will be able to upload any type of file.

I want to speed up the app by caching the sites and document libraries. I also want to surface the recently used drives to help the user upload files easier.

I want to give the user to update the DriveItem after they upload it. I am going to use the Graph API to pull down the fields on the DriveItem, build a dynamic UI for the user to edit the fields, and then save the user's edits to the drive item.

Exploring the document libraries also will be added. The user can view the files they have already uploaded, edit the fields, replace the with new content.

+ 1 more
Share this project:
×

Updates