iOS Mobile Safari File Upload renames file - ios

I have a web app designed for use on an iOS device. The web app includes file uploaders, which are meant to allow the user to upload an image from their iOS device or take an image from their camera.
The issue I'm running into is that I want the user to be able to upload PNG images through this interface, as well.
What is happening, though, is that it seems iOS renames the file image.jpg before it is sent to the web app, not honoring the original file extension. This is only an issue because I am trying to preserve transparency in the .png files, and this is lost in the extension renaming.
Any thoughts on how to handle this? Thanks, in advance, for any assistance on this front.

Mobile Safari only allows the uploads of jpeg's at this time. If you try to upload a png it will be (heavily) compressed into the jpeg format and then uploaded to the server.
The only way we have been about to get around this is by creating a native app for iOS and uploading the image through the Cocoa-Touch API's.
I've filed a Bug report with apple for this issue. Bug ID: 14494395

Related

Upload PDF from IOS App

I have an app which allows the user to upload PDF files which works fine in Android. I need the same capability in IOS as well, but I have seen that this is not directly supported by IOS. The PDF could lie as part of attachments in emails, and the user might have saved on the phone, need a way to retrieve all PDFs in phone and list it.
Has anyone implemented a similar feature in their apps? Is it feasible?

iOS iTunes app icon

I am bit confused on how to use the iTunes app icon when getting ready to distribute. I understand it has to be 512 x 512. But the part I don't get is it has to have no extension? I have extracted a couple apps and their iTunesArtwork is a unix executable. In the iTunes icon sample code from their website, for type, it just says Default data. How do I go about adding my iTunesArtwork to my project.
The 512x512 (or better 1024x1024, I think this is a recent requirement as of the new iPad intro) icon file shall be a PNG file.
Don't worry about what you see when extracting the file from a binary. The icon file can be uploaded through the browser and a PNG will just do fine.

iOS: Is it possible to access stored data (say images) from the Safari browser

My IT dept. has a web app built with java and they want to be able to access the stored images on an iPad. Is that possible?
The iOS Safari browser does not run Java. But, as of iOS 6, it does support uploading saved images with a standard HTML file upload form.

ios using itunes to upload an image to app

how can I have itunes uploading an image to the directory of my app on iOS
like user selects an png from her computer and upload that image to the file system sandbox of the app
thanks!
The feature you're looking for is called 'iTunes File Sharing'. With some googling you will be able to find plenty of tutorials about this, such as: http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app

How to copy html files to ipad and then launch in a browser

Here's a crazy question...The client wants a web application to be available on the ipad when not connected to the internet. My first thought was that it would be a great opportunity to use the offline app feature of HTML5, except that the entire web app (including all the media) is 3GB, and apparently all of it must be available. This exceeds the 5MB limit of the app cache. The website does not necessarily have to rely on any dynamic server side code. It can be straight HTML files. Does anyone know if it would be possible to manually copy the entire website onto the ipad and from there easily launch it in a browser? I was not able to do this, but I have to believe there's a way. Any other approaches to this problem that you can think of? Thank you.
I had a similar problem and here's what I found that worked (using an iPad and a PC):
Download (on the PC) the program HTTrack to the PC. This program can create an offline mirror of a website and has all sorts of options for what gets included.
Run HTTrack on the PC and create a folder for your website.
Install (on the iPad) the free App "Documents 5" by Readdle.
Connect Documents 5 to some sort of cloud based storage (I used by Google drive account, but I'm sure Drop Box would work also)
Zip the entire offline website folder mirrored using HTTrack and upload the zip file to cloud storage (Google drive)
Click on the zip file in Documents 5. It should be downloaded to the iPad
Click on the downloaded zip file in Documents 5. It should be automatically extracted.
Now open the extracted folder and click on index.html. This is your website offline.
I don't know if there is a way to move the index link to the home screen...
There are several apps that can be used for storing files on the iPad and viewing them in an embedded browser. I use GoodReader, but this might be overkill for your purpose.
I've been able to view them using FileApp (after transferring via DropBox), but it's far less than ideal.
Use hightail.com, you can link a website as a space, it will actually convert the website to preview image, then can be access on iPad as webpage in browser, no need to copy file to iPad or install any software.

Resources