These are incorrect, should be:
I do not see anywhere where you use the web component to upload or download files from your server ?
These are incorrect, should be:
I do not see anywhere where you use the web component to upload or download files from your server ?
and anyway true, I started trying with tinydbweb which never worked, while tinydb works well (but with files with internal memory I always had problems, I have android 14 and it always gives an error no matter what I try), but I really believe that in free sites it is impossible to manage the file from the program (even if you can manage them with google sheets from file manager
e comunque vero, ho iniziato provando col tinydbweb che non ha mai funzionato, mentre il tinydb funziona bene (ma con i file con la memoria interna ho sempre avuto problemi ho android 14 e da sempre errore qualunque cosa provo) , ma credo davvero che nei siti gratuiti sia impossibile gestire il file da programma (anche se si possono gestire con i fogli google da file manager
j just try also without (/htdocs/) same result
Which component?
I use save file or read from file.
Are these not enough?
ok ho aggiunto questo
OK, I added this
and it gives me the correct path, so theoretically the file has been written.
I go to file manager and the file isn't there.
If you use the file component together with the default file scope, which is "App", then the file will be stored in ASD- the application specific storage, which is not accessible so easy anymore as previously before Google introduced scoped storage to protect us from evil
To find your file in shared storage, set the file scope to Legacy or Shared and use for example
/Download/myFile.txt
i e. a relative path to the file
See also Some basics on Android storage system
Taifun
PS; this thread went off topic
i used SHARED
the problem is that it doesn't write to the site files
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
It is not possible to directly write to a file on a server using the File component.
You will need to use the web component to download the file on the server, then edit it in your app, the use the web component again to upload the file back to the server.
I didn't know that at all,
so:
set web1 url to
call web1 get
when web1 got file
I put the file in a list and change it as I like
call web1 put file
Am I right?
Something like this will handle your download and then upload:
You will need a php file on your server to upload the file (SEE HERE for a simple example that should work on your server)
I don't know how to thank you.
I'm closing for today, my eyes can't take it anymore.
I've worked on computers for 50 years and I can't stop.
Is there anyone who has a free site and can read or write files via the app? I've tried everything but it always gives a write or read error. I've also tried entering the user and password, php files with variable passages, etc., but it always responds with a write or read error.
Did you read the post where I provided blocks and a suitable php file for upload/download of files ?
Did you try it ?
Also, if you upload the engkio4twdb.php
file to your website root we can have a look at getting this working as well.
This is the path you will follow in your website control panel
`
I tried everything and I definitely ended up getting confused.
engkio4twdb.php` file
<?php // Juan Antonio Villalpando // https://kio4.com/appinventor/326A_crear_miniwebDB.htm $receive_post = $_SERVER["REQUEST_URI"]; $tag = $_POST[ 'tag' ]; $file = 'my_kio4twdb_v2.htm' ; if (!file_exists($file)) {$handle = fopen($file, 'w');} if (strpos($receive_post, 'storeavalue' )){ // If that tag already exists, delete it. $data = file($file); $add = fopen($file, "w" ); foreach($data as $line) { $fields = explode( ":" , $line); if ($fields[0] != $tag) { fputs($add, $line); } } fclose($add); $valueToSave = $_POST[ 'value' ]; $line = $tag. ":" .$valueToSave. ":i tried use mioscar.php
<?php
$nomeurl = $_GET[nomeurl]
$nomefile = $_GET[nomefile]
// URL del file di testo da scaricare
$url = nomeurl & nomefile ;
// Scarica il file di testo
$content = file_get_contents($nomeurl & $nomefile);
?>
initialize global nome url https://user:password@ufo1.byethost14.com/mioscar.php?nomeurl ="ufo1.byethost14.com/" & nomefile ="mist.txt"
buttom1 error 908
buttom2 error 1104
And it asks me to authorize it through the app settings.
But the app's permissions are for audio and video, and there are none for reading and writing files.
but if you have some example with tinydb web........, maybe it works better than files .............
@TIMA12 I also tried what you posted, no results, I did thousands of tests but I can't get anything better than error 908 error 1101 error 1104
Suggest you get hold of the support people at byethost, maybe they can assist with getting your server working correctly.