Help with Customwebview Upload issue (also using Taifunfile and TaifunImage)


So I am creating a somewhat complex app. I am using imagepicker to select a photo, that photo is then rotated (taifunimage) based on a user notifier choice. That rotated image is then copied (taifunfile) to a location/file. That image/file is then resized (taifunimage). The issue I am having is I cant get customwebview to actually upload that final file.

I have checked after the failure (no errors given, just nothing happens) and all files where created successfully with the correct contents. EG _app_inventor_image_picker folder has the picked image, and the rotated and resized image in it (have delete code to remove them after upload is complete, but I haven't implemented it yet.)

I would appreciate any help you can provide. Attached are the relevant blocks. They are kind of a mess because I have tried everything I can think of, including hardcoding many of the paths to remove global variables as the cause. The craziness with the content uri is due to searching and there might be an error in the block? The dev also had some craziness in his example. The cutoff block at the end is globalfinal. The copy is to a named file, resize is set to the same named file as well as the global variable.


This text will be hidden

Do you need to use a webviewer to upload the file ? Why not upload it directly using the web component, and provide UI with the app?

The customwebview extension requires the normal web component. If that is what you are getting at? I will look at the Web component to see if i missed something. Truth be told most of my work is in the webview so i may have missed it.

I am basically using my app as a webwrapper for online messages. I prefer not to use firefox/chrome due to the nonstandard platform I am running this on. Customwebviewer provides useragent spoofing so the site can be accessed.

Funny enough, everything worked fine until the other day in a previous version of my app that didn't copy/resize. The site implemented a file size restriction, which is why I added those and I suspect part of my issue is related to content refreshing, but my implementation is probably wrong.

Just took a look at the webcomponent and i don't see any fileupload capabilities, just postfile and putfile, which to be honest confuse me.

for example

Probably would not work in this case. Its a chat type thing and a lot of the site is in js.

The upload is triggered by clicking a button on the site which has no clear url.

OK I see ....

Since the Upload method takes a content Uri so try removing GetFileName block from there.

The customwebview dev himself @vknow360. Unfortunately your suggestion didn't work, HOWEVER, I took a step back and simplified things way down (no need to create a file to resize since image picker does that already) and it works. I think it would have worked the other way, but as suspected I was doing something from with webview file upload.

Here are the working blocks.

Good to know that you found solution yourself :+1:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.