Page 1 of 1

Disable drag and drop in viewer?

Posted: Tue Jul 18, 2023 10:38 pm
by Elise
Hello,

Is it possible to completely disable the ability to drag and drop a document into the viewer?

And if so, would that be better handled client or server side?

Thanks,
Elise

Re: Disable drag and drop in viewer?

Posted: Sat Aug 05, 2023 12:35 am
by Elise
Anyone?

Re: Disable drag and drop in viewer?

Posted: Mon Aug 07, 2023 4:29 pm
by Fabio
Hello Elise,

Sorry for the late reply.
You will need to use this property: https://www.gdpicture.com/guides/docuvi ... sDrop.html

If you set it to false in your .NET DocuVieware instance, that will block your users to drop documents in the viewer.

You can also set it on the javascript and get the configuration in the .NET instance using this line:

Code: Select all

EnableDocumentsDrop = controlConfiguration.EnableDocumentsDrop
I personally prefer to set it up server-side but both solutions work and have the same behavior behind the scene.

Best regards,
Fabio

Re: Disable drag and drop in viewer?

Posted: Tue Aug 08, 2023 8:48 pm
by Elise
Hi Fabio,

Thanks for getting back to me.

The problem with this implementation is that the viewer accepts the file, loads the file, then rejects the file so to the user, it looks like the file was accepted and drag and drop is possible, then there was a problem.

Is there a way to disable drag and drop so that the file is not accepted at all- that the drop does not occur?

(using Angular 14 on front end)

Thanks,
Elise

Re: Disable drag and drop in viewer?

Posted: Wed Aug 23, 2023 10:23 am
by Fabio
Hello Elise,

Unfortunately, this behavior is expected. But I agree this is not very optimized and could lead the user to a wrong understanding of DocuVieware's usage.

I created a task for our developers to change the default behavior when the Drag&Drop has been disabled through properties.
I will send you a message here when it will be implemented and released into production.

Best regards,
Fabio