How to upload file in Custom Webview

Add a condition to check whether mime type is empty or not.
If it is empty then set */* as data type.

not Working…

Please Help Me.

I shall fix it :+1:

Wait…but what I have to fix? :thinking:
It would be nice of you if you can tell me what is not working.
Sorry for asking.

File Uploading Not Working

Images and Videos

@Tech_Developer Try with these blocks :point_down:

1

You can download File Tools Extension from here :point_down:

OR

1

2

2 Likes

Thank You :grinning: @Anu10 It’s Working.

Olá, poderiam me ajudar no meu, fiz tudo conforme descrito, mas não acontece nada, não da erro, mas também não abre o gerenciador para anexar os arquivos.

Post in English. :slightly_smiling_face:

1 Like

Hello, could you help me with mine, I did everything as described, but nothing happens, not the error, but also does not open the manager to attach the files. I have already attached the blocks previously, below is the screen of the (SITE) “Application” to which I want to attach the payment receipt.

Following changes made, but also without any success.

Maybe it’s because you have not enabled FileAccess property.
If it is disabled then FileUploadNeeded event will never get invoked.

Hi @vknow360 , I tried again, and got Error 601: No corresponding activy was found. However, this error only happens once, and then nothing else happens, it doesn’t open the file manager for sending, nor does it give any error.

Show the complete blocks.
Enable FileAccess just before GoToUrl method.

Because you have not defined what WebView should do to file upload callback if there’s an error with Intent.Pass an empty string to UploadFile method to cancel the request.

2 Likes

Image of the complete blocks below.

Apparently, everything is ok as suggested to me, I’m having a bit of difficulties with the Google translation, I’ll attach the .aia file to check, the problem is on Screen3. :cold_sweat:

AvellarPizzas.aia (1.1 MB)

I appreciate the help, waiting for reply.

Here is a working AIA file made using App Inventor so you won’t be able to compile it in Kodular:
CustomWebView_Permission.aia.zip (112.1 KB)

Hello, I did everything according to the model sent, continued the same ERROR 601 I’m going to attach an image of the blocks.

model block:
Capturar1

my blocks:

I’m in doubt, because your Fla stops when you click the button, and mine is when screen3 starts, does it have any influence?

I wonder why it looks different for me:
image

In case you uploaded wrong aia:
CustomWebView_Permission (2).aia (112.1 KB)

1 Like

Sorry to bother you persistently, but I’m really lost in this error, I did as per the attached image, error continued.

see the video I recorded from the screen.

I uploaded the aia that sent me last, the blocks came a little messy, the first aia.zip was organized.
Capturar1

I will be very grateful for his help.

Post an apk then.

Yeah that was expected
Kodular is losing compatibility with App Inventor.
So better check in App Inventor.

2 Likes

APK

AvellarPizzas_1_4_1.apk (7.4 MB)

I spent the day yesterday trying, but without success, changing blocks, so you sent me, but without success. Only this error 601: No correspondig activity was found. What can you think? Your project has an exclusive button to upload the files, right here, mine, it’s just a site being emulated in the form of an Application, isn’t it? application is all perfect, but there is no way to attach the receipt at all… :cold_sweat: :cold_sweat: