[WB22] Upload control (seems to be local dnd problem) SOLVED

Startbeitrag von Piet van Zanten am 16.11.2017 12:51

Hi,

I'm playing with the html 5 upload control, but I cannot get the drag and drop from the explorer to work.
Selecting and uploading multiple files from the filepicker works fine.
I did set the dnd option of the file list to accept, but that made no difference the cursor is always a forbid sign when hovering the list.
Anyone got this working?

Kind regards,
Piet

Antworten:

Re: [WB22] Upload control

Hi Piet

yep... got it working all right... Didn't have the time to understand all the details, so I took the working example provided and used it as a base... just modified the code dealing with what happens to the files once they are on the server.

Best regards

von Fabrice Harari - am 16.11.2017 13:14

Re: [WB22] Upload control

Thanks Fabrice,

I took the control from the create button option on the Creation tab.
Now I also tested the Example and drag and drop works on this one.
The difference seems to be the page.
On the example the cursor is a copy cursor on the entire page, in my test page it's a forbid sign on the entire page.
The page is HTML 5 though, the only difference is that it's dynamic, not awp.
But I tested my page in AWP mode too and that didn't work either.

Kind regards,
Piet

von Piet van Zanten - am 16.11.2017 15:25

Re: [WB22] Upload control

But when I uncheck AWP mode in the Webdev example there's no more drag and drop avialable.
It seems dynamic non-awp pages do not accept any dnd :confused:

von Piet van Zanten - am 16.11.2017 15:32

Re: [WB22] Upload control

Hi,

This is really weird.

  1. If I open a dynamic Webdev site from the web, I can drag any file into the browser (Chrome).
  2. If I open the same Webdev site from the WB editor on localhost I get the forbid sign. If I open site A in a second tab from the same browser I get the forbid sign too.

But an awp page started from the WB environment does allow dnd.

There must be some local browser setting that prevents dnd locally on dynamic non awp pages but I have no clue.

Kind regards,
Piet

von Piet van Zanten - am 16.11.2017 16:16

Re: [WB22] Upload control (seems to be local dnd problem)

sorry I cannot be of more help...

I can only tell you that I'm using that in a classic webdev site, and the drag and drop works both in test mode and deployed without any problem... tested on chrome and firefox (don't remember if I tested in edge)

Best regards

von Fabrice Harari - am 16.11.2017 18:13
Hi,

I found the cause of the problem.
There's a security issue that prevents files to be dragged into the browser when running the browser as administrator.
As I'm running Webdev as administrator to avoid annoying questions from UAC, so the browser is also running as administrator when in test mode. Hence the problem.

Kind regards,
Piet

von Piet van Zanten - am 16.11.2017 20:51
And the solution:
- First start the browser outside Webdev
- Run Go, the page will be opened on a new tab in the already open browser, not running as administrator.
Now d&d is possible.

von Piet van Zanten - am 16.11.2017 21:01
Thanks Piet,

I just planned an upgrade for next week to replace the flash-upload to the html5 upload on one of my customers webapps. Most probably you saved me some time :spos:

von Arie - am 17.11.2017 07:40
Hi Piet,

good to know... but what UAC problems? I'm running all pcsoft products as a regular user, and I do not have any uac messages popping up...

Best regards

von Fabrice Harari - am 17.11.2017 11:53
Hi Fabrice,

My settings for UAC are standard, I used to have a message (in WB19 already) when WB started and each time I ran a test.
I got rid of this by creating a task in the task scheduler, with a shortcut on the desktop to start this task, running with maximum rights.
I automatically applied this solution to each new version.
To my surprise when I just tried to run WB as a normal user, no messages at all :confused:

Kind regards,
Piet

von Piet van Zanten - am 17.11.2017 14:50
Hi Piet

maybe you chose to install that version the 'standard' windows way (ie with some of the program in the program files directory)

I always install everything in one directory, and that directory is never in program files, so that may account for the different behavior

Best regards

von Fabrice Harari - am 18.11.2017 12:46
Hi Fabrice,

Funny thing is that the last installation is actually in the Program Files folder.
I always did it in a unique directory too.
Still have an occasional UAC question, but that is only on first start of Webdev, no more on consecutive starts as long as the computer stays on.
So either Windows has evolved to "remember" an allowed program or Webdev has evolved to handle UAC better, who knows.

Kind regards,
Piet

von Piet van Zanten - am 18.11.2017 19:04
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.