I’m brand new to CUBA Platform and Studio so usual apologies and disclaimers apply
I’m tring to create an edit screen for an entity that has an image column. Standard HTML has the input type file with “accept” and “capture” attributes that should allow me to load the image into the entity from a web cam. Studio has the file upload component which includes the “accept” attribute which appears not to work - no matter what value I specify, the HTML generated always contains the same “application/octet” string . “capture” is not provided in Studio at all as far as I can see.
So given that Studio 7 is now available is Studio 6.10 still supported? If so can “accept” be fixed if it is broken and what are the chances of supporting “capture”. I have tried to add a new component by using the slider sample but even following the documentation to the letter the slider doesn’t work as when I launch the web page it complains that it cannot find the javascript init method even though I’ve created it as per the guide
Thanks for any pointers/comments.
Andrew Waters UK.
The accept XML attribute (and the corresponding setAccept() method) can be used to set the file type mask in the file selection dialog. Users still be able to change the mask to “All files” and upload arbitrary files.
The value of the attribute should be a comma-separated list of masks. For example: *.jpg,*.png.
So, in order to capture image from a webcam, you need to implement some JavaScript component.
I suppose that you have some errors in your javascript connector file. Please check browser console.
Wow!
First I tell myself off for not reading the docs about “accept” and making incorrect assumptions about what it was intended for
Second WOW WOW for taking the time to show me how to solve my problem in such detail even providing the solution! I’ve been out of the country so I’ll try your solution and investigate what the problem was with my test as soon as I can.