M micro Well-Known Member Licensed User Longtime User Aug 18, 2020 #1 Hi to all I proceed with the tests, but just to learn and try something different, I have never seriously developed webapplication (the time available is always short) The function File it's not used by BANano, then for write and read a file map (in Dir.App or other path) how can i proceed? I don't know if you need to transform it into json format and write/read it with inlinephp..... Some simple examples, thanks.
Hi to all I proceed with the tests, but just to learn and try something different, I have never seriously developed webapplication (the time available is always short) The function File it's not used by BANano, then for write and read a file map (in Dir.App or other path) how can i proceed? I don't know if you need to transform it into json format and write/read it with inlinephp..... Some simple examples, thanks.
alwaysbusy Expert Licensed User Longtime User Aug 18, 2020 #2 Maybe this can help: https://www.b4x.com/android/forum/t...thout-uploading-to-the-server.117268/#content File, as it is known in B4X, will never be available in BANano, as Web Browsers do not have access to the local disk without user intervention (a very good thing!) Upvote 0
Maybe this can help: https://www.b4x.com/android/forum/t...thout-uploading-to-the-server.117268/#content File, as it is known in B4X, will never be available in BANano, as Web Browsers do not have access to the local disk without user intervention (a very good thing!)
M micro Well-Known Member Licensed User Longtime User Aug 18, 2020 #3 alwaysbusy said: Maybe this can help: https://www.b4x.com/android/forum/t...thout-uploading-to-the-server.117268/#content File, as it is known in B4X, will never be available in BANano, as Web Browsers do not have access to the local disk without user intervention (a very good thing!) Click to expand... Ok clear enough, thanks. but I don't have to choose the file with fileExplorer, I already know the path, so I have to access it directly but I don't know how to provide the path to BANano Example: File "settings.cfg" in BANano.ASSETS_FOLDER Last edited: Aug 18, 2020 Upvote 0
alwaysbusy said: Maybe this can help: https://www.b4x.com/android/forum/t...thout-uploading-to-the-server.117268/#content File, as it is known in B4X, will never be available in BANano, as Web Browsers do not have access to the local disk without user intervention (a very good thing!) Click to expand... Ok clear enough, thanks. but I don't have to choose the file with fileExplorer, I already know the path, so I have to access it directly but I don't know how to provide the path to BANano Example: File "settings.cfg" in BANano.ASSETS_FOLDER
DonManfred Expert Licensed User Longtime User Aug 18, 2020 #4 It does not help to know the path if you are not able to access that file from javascript. Upvote 0
alwaysbusy Expert Licensed User Longtime User Aug 18, 2020 #5 DonManfred said: It does not help to know the path if you are not able to access that file from javascript. Click to expand... This is correct. As I said, without user interaction, a web brower/javascript is not allowed to access anything on your local hard disk. This is browser build-in security so no one can access your private files. Upvote 0
DonManfred said: It does not help to know the path if you are not able to access that file from javascript. Click to expand... This is correct. As I said, without user interaction, a web brower/javascript is not allowed to access anything on your local hard disk. This is browser build-in security so no one can access your private files.
alwaysbusy Expert Licensed User Longtime User Aug 18, 2020 #6 micro said: settings.cfg Click to expand... If this is located on your webserver, you can fetch it with a BANanoFetch: https://www.b4x.com/android/forum/threads/banano-the-fetch-api.106666/#content But then this of course means your config.cfg is for grabs for anyone just by putting an url to the file in their browser. If your config.cfg contains sensitive data, it will be readable by anyone. Upvote 0
micro said: settings.cfg Click to expand... If this is located on your webserver, you can fetch it with a BANanoFetch: https://www.b4x.com/android/forum/threads/banano-the-fetch-api.106666/#content But then this of course means your config.cfg is for grabs for anyone just by putting an url to the file in their browser. If your config.cfg contains sensitive data, it will be readable by anyone.
M micro Well-Known Member Licensed User Longtime User Aug 18, 2020 #7 Thanks to all so it seems to go, returns the promise object with the file data B4X: Log(BANano.GetFileAsText($"${BANano.ASSETS_FOLDER}/settings.cfg"$, Null, "UTF8")) Upvote 0
Thanks to all so it seems to go, returns the promise object with the file data B4X: Log(BANano.GetFileAsText($"${BANano.ASSETS_FOLDER}/settings.cfg"$, Null, "UTF8"))
M micro Well-Known Member Licensed User Longtime User Aug 18, 2020 #8 alwaysbusy said: If this is located on your webserver, you can fetch it with a BANanoFetch: https://www.b4x.com/android/forum/threads/banano-the-fetch-api.106666/#content But then this of course means your config.cfg is for grabs for anyone just by putting an url to the file in their browser. If your config.cfg contains sensitive data, it will be readable by anyone. Click to expand... Ok, thanks for your advices (and yours DonManfred) Upvote 0
alwaysbusy said: If this is located on your webserver, you can fetch it with a BANanoFetch: https://www.b4x.com/android/forum/threads/banano-the-fetch-api.106666/#content But then this of course means your config.cfg is for grabs for anyone just by putting an url to the file in their browser. If your config.cfg contains sensitive data, it will be readable by anyone. Click to expand... Ok, thanks for your advices (and yours DonManfred)