PDA

View Full Version : Weborder sample question



Hans van de Laar
16-Jan-2017, 08:21 AM
Isn't the 'File dialog' function in the Weborder sample supposed to show pictures in the cWebImage object 'oPreview' for certain mime types?

Stephen W. Meeley
16-Jan-2017, 08:34 AM
Hans,

Looks like that's not functioning properly. Same thing happens in 18.2 (I didn't test earlier than that). We're on it.

Hans van de Laar
16-Jan-2017, 08:56 AM
Thanks Stephen

Stephen W. Meeley
16-Jan-2017, 05:49 PM
Hans,

The example is kind of quirky. The images will not render in oPreview unless they are in a registered download folder - of which (you guessed it) there are none in the example. If you go to the treeview you'll set this code...



Property String psStartupPath "C:\Users\Harm\Pictures\"
// Send RegisterDownloadFolder of ghoWebResourceManager "C:\Users\Harm\Pictures\"


...and since I'm guessing you don't have Users\Harm\Pictures\ on your system you can do this instead...



Property String psStartupPath "C:\DataFlex 19.0 Examples\WebOrder\AppHTML\Images\"
Send RegisterDownloadFolder of ghoWebResourceManager "C:\DataFlex 19.0 Examples\WebOrder\AppHTML\Images\"


...and it should make more sense.

Hans van de Laar
17-Jan-2017, 04:52 AM
Hi Stephen,

This still doesn't work for me. It is only showing images properly when browsing a folder under the web site root. So using a RegisterDownloadFolder outside of the web site root for accessing local files doesn't seem to work (anymore), probably
because browsers have more security build in when accessing local files. You will notice a js error "Failed to load resource" when trying to display an image from a different location.

Stephen W. Meeley
17-Jan-2017, 05:56 AM
Hans,

I think that's because the IUSR account doesn’t have rights on most folders causing a lot of images not to show. Like I said, the example is really kind of a strange one because it's questionable that a web application would do that (too many security risks). We weren't sure what to do about it ourselves (which is kind of the reason that its in it's current state).

On the bright side. the sample does show how components can work together pretty interactively (resizable panels, treeview, manual grid, dialog).

Hans van de Laar
17-Jan-2017, 11:16 AM
Hi Stephen,

Thanks for clarification.
I agree with your statements.