<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by purans on Medium]]></title>
        <description><![CDATA[Stories by purans on Medium]]></description>
        <link>https://medium.com/@purans?source=rss-cfcb7487ac0e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ra70xkXti6ycrqM0x_mWCw.jpeg</url>
            <title>Stories by purans on Medium</title>
            <link>https://medium.com/@purans?source=rss-cfcb7487ac0e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:16:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@purans/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Uploading to Google Cloud Storage from iOS app]]></title>
            <link>https://medium.com/google-cloud/uploading-to-google-cloud-storage-from-ios-app-e9f4097b516?source=rss-cfcb7487ac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9f4097b516</guid>
            <dc:creator><![CDATA[purans]]></dc:creator>
            <pubDate>Wed, 12 Nov 2014 06:42:28 GMT</pubDate>
            <atom:updated>2014-11-12T06:59:31.963Z</atom:updated>
            <content:encoded><![CDATA[<p>I am using Google appengine as well as Google cloud storage to store images uploaded from my iOS app (<a href="http://intomoviesapp.com/">IntoMovies: Goodreads for movies and a community for movie and TV show fans</a> — ). And, it took me a bit of head scratching to get image upload working from iOS directly to google cloud storage. Also, I didn’t want to use google’s iOS library which I think is not very clean, has way more code than it’s really needed, and is too complicated for simple use case.</p><p>I looked around for a easier way to upload images and finally got it working and wanted to share with other developers as I saw lot of developers asking questions related to it in <a href="http://stackoverflow.com/">stackoverflow.com</a> and with not much of answers.</p><p>So, here’s what I did. I am assuming that you have google app engine project created and Google Cloud Storage is enabled in console’s APIs &amp; auth section. Now simple 3 steps</p><ol><li>Create a bucket in Cloud Storage section of your project’s console</li><li>Create upload servlet or controller in appengine server that does 2 things:</li></ol><p><em>a) GET request handler that uses appengine’s blobstore service to create the upload URL based on bucket name and other options and return to the client app.</em></p><p><em>b) POST request handler which is basically a callback from google cloud storage once image is uploaded to cloud store.</em></p><p>Here’s the code for our Upload servlet,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66c69702640fbf69fd160ce4c89ebcf8/href">https://medium.com/media/66c69702640fbf69fd160ce4c89ebcf8/href</a></iframe><p>3. Now the fun part, iOS client. Here I have a single method uploadImage that first gets the upload URL and uploads image data to that URL using multipart upload. Here’s the client code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b6263625cb6d6b5cee76ac9c3ee76d7/href">https://medium.com/media/7b6263625cb6d6b5cee76ac9c3ee76d7/href</a></iframe><p>One thing to note here is the form data that we pass in such as ‘name’ and ‘filename’ these should match the param names that you read in our POST request handler. Also, we are using blobstore to upload images to google cloud storage that way we are not limited by timeout limit on appengine instances. Though, we might need to have a cron job to remove keys from blob store. Hope this helps!! Feel free to ask questions!</p><p><em>Originally published at </em><a href="http://narup.blogspot.com/2014/11/uploading-to-google-cloud-storage-from.html"><em>narup.blogspot.com</em></a><em> on November 12, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9f4097b516" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/uploading-to-google-cloud-storage-from-ios-app-e9f4097b516">Uploading to Google Cloud Storage from iOS app</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>