Notification "Sorry, File To Resize Does not Exist." Help

Hi, this is from previous "Unable to Resize Images", recently i tried to modify the application for additional features purposes without modify the Presention Menu. This Application has two "work-attendance" feature and Thanks to the Community I was able to resize the photo using base64String and upload it to Google Drive using Script Google. on the first one, it was okay. but the second "afterwork-attendance" feature, come out the notification "Sorry, file to resize does not exist", yet still able to uploaded to Google Drive, how can get rid of the notification? Thanks

This is the block of mine

Probably here:

image

If the image file is in your ASD in the Pictures folder, you will need /Pictures/ in the path....

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

The TaifunImage extension needs an

  • absolute path or a
  • full path or (at least) a
  • relative path.

Your path looks like this: /Pictures/app_inventor_1648147559973.jpg
and this is NOT a path (in this case), but the File component can handle it, because it redirects it to the ASD if the FileScope is set to App (default setting).

See also here:

No.... :wink:

image

1 Like

so if there's no problem on "absolute path" in it, and how can I get rid of the notification?

No to what?

As I said, you must use a β†’ full path or an β†’ absolute path or a β†’ relative path:

The path required for Taifun's resize function, for the OP's example is:

/Pictures/image.jpg

as I suggested in the first place.

No, as I said, this is NOT a path (in this case, also not a relative path).

The relative path would be (Companion):

/Android/data/edu.mit.appinventor.aicompanion3/files/Pictures/app_inventor_1648201642677.jpg

I will leave you to test that out. Taifun is quite clear, the resize function targets files in the ASD, therefore if a file is inside a folder in the ASD, this must be set, but there is no need to provide the entire path to the ASD as well, because this is handled in Taifun's resize function.

I posted an image from his documentation to advise you, but you seem unwilling to accept this....

This has nothing to do with resizing the image....

Sorry, didn't read blocks properly :upside_down_face:

:question:

I don't get it. What are you trying to tell me?

This works just fine for me in companion:

image

Have you got the latest version of extension ? (Oct 21)

Can this be misunderstood in any way? I don't think so.

grafik

Oh, let me check.
I took the current example from Taifun's website.

OK, with the last version of the extension it works with the subfolder in the ASD and the fileName:

  • /Pictures/image.jpg (which is of course NOT a path) and / or the
  • absolute path:
    /storage/emulated/0/Android/data/<packageName>/files/Pictures/image.jpg

imResizePath.aia (38.2 KB)

OK looks like we have that all cleared up then.

The latest version of the Image extension (Oct 21) is set to use the ASD as the base directory for image functions. If files are stored in any sub folders then these sub-folders must be included in the file path set to the resize function.

Yes, or as I said (and have shown) use the absolute path.