batMask
batMask

Reputation: 744

input type "file" is not working on iPad

In my form I'm using a file uploader. It's working fine on MAC, But it's not working on iPad.

<form name="form" method="post" action="#" enctype="multipart/form-data" >

<input type="file" name="actFile" />

</form>

$imgName = $_FILES['actFile']['name'];
$tempFile = $_FILES['actFile']['tmp_name'];
$targetFile = 'images/' . $imgName;

$scss = move_uploaded_file($tempFile,$targetFile);

I'm confused,

Upvotes: 0

Views: 1121

Answers (1)

Midhun MP
Midhun MP

Reputation: 107121

Update (On 2017)

Now if you specify the input type as file the OS will allow you to choose from available file sources like PhotoLibrary, iCloud etc. However if you are showing the html page inside an app using WebView, then you need to ask for corresponding permissions. For example, if you want to choose image from PhotoLibrary; then you need to specify the NSPhotoLibraryUsageDescription key in your app's info.plist file. If you don't do that the app will crash by raising an exception.

Original Answer (On 2014)

There is no option to browse files in iPad.

That's why the file input is not working in iPad.

It'll work on mac because, mac have finder for browsing the files and it is allowed. But in iPad it is not allowed.

Upvotes: 1

Related Questions