B4J Question [ABMaterial] ABMupload formatting

David Elkington

Active Member
Licensed User
Longtime User
Hi,

I am using the upload tool to gather file from people and was wondering two things.

1. Can I change the size of the control, I would kind of like it to span the whole bottom of the screen so that the drag area matches the size of the 12 cells with a defined height. I would also like to make the border dotted and rounded corners, and perhaps remove the browse button altogether in some cases. I can't see a way of doing this currently.

2. Is there a way to put a filter on the files that can be browsed to? I would like them only to select PDF's for example.

Many thanks.

David
 

alwaysbusy

Expert
Licensed User
Longtime User
1. you can't. It has a fixed size and look
2. As Harris demonstrated, you have to catch it in the handler. There isn't a guaranteed way to do it on the browser side. There has been an 'accept' attribute that has been proposed some time ago, but a lot of browsers just ignore it as it is no guarantee anyway.
 
Upvote 0

David Elkington

Active Member
Licensed User
Longtime User
Sorry, I can't see any formatting in that post. My upload is working, I just want it to span across the bottom of the screen a bit like the attached... Mine currently looks like the green one.
pasted image 0-1.png
Screenshot 2018-10-30 at 06.49.34.png
 
Upvote 0

David Elkington

Active Member
Licensed User
Longtime User
1. you can't. It has a fixed size and look
2. As Harris demonstrated, you have to catch it in the handler. There isn't a guaranteed way to do it on the browser side. There has been an 'accept' attribute that has been proposed some time ago, but a lot of browsers just ignore it as it is no guarantee anyway.

Ah, ok, I can do that, will just have to ping them a toast to say they have selected the wrong file type.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
1. you can't. It has a fixed size and look
The way it is... I have dealt with it - and accepted it (like so many others wishing for more). Hopes and dreams preval - but there are always more important things to target. It works - and well.

See what is going on under the hood - debug with Log(). Only then will you truly understand - and so will the rest of us..
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
I can't see any formatting in that post
Harris is talking about the second part of your question there (only allow pdfs)

to ping them a toast
sounds like good feedback to the user

Could I for instance put it on a modal sheet?
I kind of remember it didn't work in the past, but can't recall if it does now. Maybe just try it

As for the the look-and-feel of the component, add a wish case in the feedback app and I have a look what I can do. Please make a good description of what you want.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Seems a topic for the dummies tut. I can see where he is coming from...

It is tricky to begin with. It took much time to figure out and get it straight.

Also, the download folder can be littered with Muiltipart-"***" files if you don't clean them up (- after failed downloads, duplicates, etc).

I'm busy (like ab), but will try and slip it in to some easy example.
 
Upvote 0
Top