Thank you very much now it's working when i click upload the first time but when I click the second time not working..
and your html ?
use this one is the same of my page
<?php
if ($_SERVER['REQUEST_METHOD']==='POST') {
header('Content-Type: application/json');
if (!isset($_FILES['f']) || $_FILES['f']['error']!==UPLOAD_ERR_OK) {
echo json_encode(['ok'=>false,'msg'=>'no file']); exit;
}
@mkdir(__DIR__.'/upload',0775,true);
$name = 'test_'.time().'_'.basename($_FILES['f']['name']);
$ok = move_uploaded_file($_FILES['f']['tmp_name'], __DIR__.'/upload/'.$name);
echo json_encode(['ok'=>$ok,'saved'=>$name,'ini'=>[
'upload_max_filesize'=>ini_get('upload_max_filesize'),
'post_max_size'=>ini_get('post_max_size'),
]]); exit;
}
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="f">
<button>UP</button>
</form>
``` the problem is the I have do the geolocation function only using visualizzatoreweb but when I used this the upload not work, because at the first the upload was do with webviewextra but if I use webviewextra doesn't work the geolocation..
This could be your issue. The android webview may be struggling to use multipart/form-data
, although it should work...
Adjust your html and php to not use this.
A couple of php examples using the web component:
Explain what you are hoping to achieve with geo location
Permissions must be requested successively (one after the other) and only on Android versions where they are available. Storage permissions are no longer available or permitted on all Android versions.
See also here:
In my website with the geolocation I have the exact position with the place
Vitamarinaweb (2).aia (801.4 KB)
this is my project here the geolocation works but the uploading not works.
The location of the device? Is that what you require?
The location of the device
You can get this using geolocation in the html:
This in the webviewer. If you also use webviewextra extension you can upload your files as well
Also looking at your blocks, the locationChanged blocks are incorrect:
They should be like so:
assumes that your site is receiving this correctly (looks like the user needs to be logged in to the site)
The app told me permess denied because I'm using webviewextra but webviewextra is for file uploading
Use the helper blocks for permissions, and do as @Anke said with respect to asking for many permissions
Because I have read on the web that if you are using webviewextra for file uploading android denied the permissions geolocation, other side if I use geolocalization with webviewer the uploading doesn't work, I ' m working too many days to find the solution but I'm going crazy is too difficult to work in specific blocks created by other people, if there a genius that show me the blocks correct solution, I will thank you him very much, thanks
Where did you read this?
If you are patient, do not create any new topics, and give me a chance, let me see if I can come up with a working solution, that on upload of a file, the file, the filename, and the users location are stored. It may take me a little while to set all of this up.
“Thank you so much for taking the time to help me. I really appreciate your dedication, and I’m happy to wait while you work on this. I’m sure your solution will be very valuable.”
I read that webviewextra don't permit geolocation in a powerfull program that search all informations on the web, but I don't sure of this information..
I have a working method for AI2 with the webviewer, just need to tidy things up a bit. Will be ready some time tomorrow.
Thank you