How to delete permanently file

Anyone know how to permanently delete a file or corrupt it so that it cannot be restored.
I have tried to overwrite a file (with same name) with the File component, but using an android app I can always restore it.

Any ideas?

  1. Why?
  2. Is the file name (and the storage location in the external storage) known?
    If so, use a Clock component: if file existdelete fileName

Yes i know the file name.
I’m making an app that needs to take a photo of a confidential document, process the image in base64 and then delete it.
Because I haven’t found a way to take a picture and convert it to base64 without the image being saved on the disk (internal not sd card), I need to find a way to permanently delete the image without any chance of recovery.

Now I’m thinking of looking for a data erasing app that I could open programmatically from my app to erase the file, but that’s just an idea…

Any idea is welcome

Please explain this in more detail. What does that mean in particular:
without the image being saved on the disk (internal not sd card)”?

In principle (in programming) when an image is created after taking a picture (or upload file) it should be in raw form like (blob or other) before being saved on the internal disk as a jpg image, my idea was to intercept this raw data to convert it to base64 if there is an extension that can do it, in any case it would be possible in javascript so I guess in Java as well but i do not know Java.
By internal i mean /storage/emulated/0/DCIM/Camera/

This is the external storage, see here:

Ok thanks, I used the wrong term. It was as opposed to the SD card because I must have read somewhere that there were limitations to writing on the sd card.
Good to know.
Still looking for solution, if anyone have idea…

I want that too, but sadly App Inventor doesn’t support returning raw Image objects (which you can read it from a variable, or save to variable without writing to the file). So all extensions and components always save the file to the disk and return its file path when you create and modify an image.

Yes, I have made the same observation, I have explored a few leads:

  • Using the webviewer component to have access to the camera and tried to do the manipulation.
<input type="file" accept="image/*;capture=camera"/>

But it always opens as an imagepicker. Using the CustomWebView would probably give more chance but it doesn’t even work, I must have done it wrong.

  • Display the camera and make a screenshot, but the image becomes all black and anyway for the moment the image is recorded on the disk too. :grin: