Challenge Overview
INTRODUCTION
This is the next in a series of iOS challenges to develop a mobile front end for submitting issues to a JIRA ticketing system. This challenge will focus on updating the existing project to incorporate the first step in a video upload feature.
REQUIREMENTS
You’ll be updating the existing Xcode project to include functionality for uploading media files (photos or videos) to S3 on issue submission to JIRA.
In the previous challenge, we added handling of the display for the custom field type com.atlassian.jira.plugin.system.customfieldtypes:url. This field type renders on screen as a button for the user to select a video or photo from their device to attach to the JIRA ticket.
In order to upload the file to S3, you’ll be making an API call to a proxy to retrieve a pre-signed URL. The base URL for the proxy server is accessible via the Configuration singleton in the JIRA library project.
To upload via the proxy, first do a GET to /getPreSignedPutUrl/file.ext where “file.ext” is the file as it should be named in the S3 bucket Name the file uniquely using the logged in user’s ID and a UTC timestamp. The response will return the following JSON structure:
{
"url": "https://bucket.s3.amazonaws.com/werbung/file.jpg?AWSAccessKeyId=XYZ&Expires=1461706880&Signature=XYZ"
}
Do a PUT to the above URL with the binary data of the file to be uploaded in the body of the request. If the upload is successful, set the value of the custom url field in the POST to JIRA to the URL received above, less the query string. If the upload fails, prompt the user to either try the upload again, or continue issue submission to JIRA without the attachment.
This upload operation should only be performed if the user selected a media file to attach to their issue. Otherwise, the issue submission to JIRA should continue normally.
SETUP
-- See the challenge forums for details on adding yourself to the Hercules Werbung group on Gitlab if you are not already a member
-- Once added to the team, fork the repository if you haven’t already and work off of the PW_09 branch
-- Add harrywynn and lazybaer as members of your forked repository with Reporter access
-- View the README in the repository for API access specifics and resources
Final Submission Guidelines
-- Xcode 7.3 project with all screens and functionality as outlined above
-- Code must compile against iOS SDK 9.3 with a deployment target of iOS 8.0
-- Develop for iPhone (locked to portrait) and iPad (not locked) size classes
-- Use storyboards and autolayout for all views and navigation
-- All code must be written in Swift and be well commented
-- Upload your source project as a zip