Is it possible to browse the file system and upload the files on UIWebView in iPhone? - iphone

In the web page, I have file upload widget. I need to show this web page on UIWebView. Is it possible to browse the file system and upload the pdf, doc, xls files?

Note: this answer was correct when written in 2012 and iOS 5 was current. iOS 6 introduced media uploads and iOS 8 allowed arbitrary file uploads.
No is the short answer. iOS has no user accessible file-system.
At WWDC they announced the ability to upload pictures in iOS6 but there is no publically available information on how that works.
You could do it by interacting directly with the website using the lower level tools (NSURLConnection, etc) and creating your own "open" dialog.

iOS grants the webView no means to browse the file system, so no you will not be able to use the normal upload mechanism in UIWebView
You will have to present some API to your web server that allows you to send images as POST

The answer would be NO, since the webview runs in a different sandbox as compared to native applications.
Also there is no accessible file system mechanism like android for iOS.
Even native application have very limited file access pertaining to only their own and certain user directories like tmp, documents etc.

Related

How do I allow a user to browse/choose a file from device in iOS

I want to allow the user to upload the files in my iOS application just like the way we upload a particular file in desktop applications with browsing through the different directories. I did some googling too, but did not find the reliable solution.
Someone says that.
The whole file system is not available, if you're running a non-jailbroken phone. Neither are there filesystem browser controls (for the same reason), However, you can browse the user's photo library, or even take a photo with the camera using UIImagePickerController.
Some questions were like this
Is iOS developer able to view file systeme
How to list all folders and their subdirectories/files in iPhone SDK
From these links and from other sources,
I am only confused that can i provide the file browse option to user on button tap. And if yes, then how it can be achieved? Any help will be appreciated.
If the user taps on the Browse button the list should be there like
iPhone apps are sandboxed. This means that you can only access files/folders inside your AppBundle (like Documents, Cache and the like). That is what the above mentioned URLs are suggesting. You can only upload/download data from/to these folders.
Now if you have a jailbroken phone, its a different scenario. Not going into that.
Check this link out:
Apple iOS Environment under that The App Sandbox
There is no standard control for this purpose, but using the methods mentioned in the posts you referenced, populating a table view is perfectly doable. Keep in mind that this will allow you to view the files in your application's sandbox. You cannot access files of other applications.
Alternatively, you can use open source libraries like the ios_file_browser or the iOS-File-Browser. These provide user interface and you can check out the implementation as well.
Starting in iOS 8, you can use UIDocumentPickerViewController, "a view controller that provides access to documents or destinations outside your app’s sandbox":
https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller
I'm an author of FileExplorer control which is a file browser for iOS. It allows you to browse files and directories that are placed inside your sandbox in a user-friendly way.
Here are some of the features of my control:
Possibility to choose files or/and directories if there is a need for that
Possiblity to remove files or/and directories if there is a need for that
Built-in search functionality
View Audio, Video, Image and PDF files.
Possibility to add support for any file type.
You can find my control here.

Browse all pdf and text files in the iphone

browse file in iphone I'm developing an iPhone app in which I have to upload the PDF and text files on server from iPhone. Please guide me can i browse all pdf files stored in iPhone into my application?
Its not possible to Monitor(Browse) the Files in IOS. Apple does not Approve this type of applications. And also iPhone/iPad we can't access the Other Application Data's. As per your point The PDF must be located in Other iOS Application. We can't Browse the Files Except Bundles and Documents folder.
Only way you can Upload file to Server and Make browser list Using Tableview.
The following are the possible ways to do this.
FTP UPLOAD:
We can Upload Documents to FTP Server and Download Via FTP in iOS.
In This. Upload and Download we neet to use Authentication policy.
SimpleFTPSample
Upload things to a FTP in Objective-C iOS
Server Upload.
We can Upload File to Server(Php,ASP.net,ect). The download is Ordinary method.
Link 1
Link 2
You app runs in a Sandbox environment. This means the app can only access files and directories within its own contents.
More Information On File System Programming Guide

opening a file in its native program with GWT

I wanted to open the files available in my web application to its corresponding native apps in PC. I have created the set of program to download the file from web app but didn't know how to set that files to open with native app in system. kindly help me in this. If you have any other options to use rather than downloading and displaying the file please suggest me.
Note: I am using eclipse to develop web app
This problem is not related to GWT. Just provide links to files in your app. When a user clicks on link, user's browser/PC will decide what to do with a file. It will either open the file within a browser (PDF, images, some video and music files depending on a browser), or it will offer to save them.

Is it possible for a web based app to retrive images from an iphone?

I'm creating a website which I would like to be supported on the iphone as well. The site allows users to upload images and manipulate them. On a desktop the user will simply click the upload button to select the file from their computer and upload it to the site. But this will fail on an iphone.
Is there any way for a pure web app which is using php/mysql/js and runs inside the browser to get images from a user's camera roll? Does Apple offer any APIs to make this possible?
No, it's not possible currently - but apparently iOS 6 is going to support image and video uploads from MobileSafari.
(Apart from that, you can ask your users if their device is jailbroken and id so, suggest them downloading Safari Upload Enabler from Cydia).

Keynote and Pages File Location on Ipad

Are the files accessible from an SDK API call?
I don't think that Keynote, Pages or Numbers are given the same special treatment that Photos gets. You can write an app that can open a file that it has created in one of these apps. But opening documents in another app's sandbox is typically not supported.