Disable drag and drop in viewer?

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
Elise
Posts: 3
Joined: Tue Jul 18, 2023 10:21 pm

Disable drag and drop in viewer?

Post by Elise » Tue Jul 18, 2023 10:38 pm

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

Elise
Posts: 3
Joined: Tue Jul 18, 2023 10:21 pm

Re: Disable drag and drop in viewer?

Post by Elise » Sat Aug 05, 2023 12:35 am

Anyone?

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Disable drag and drop in viewer?

Post by Fabio » Mon Aug 07, 2023 4:29 pm

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

Elise
Posts: 3
Joined: Tue Jul 18, 2023 10:21 pm

Re: Disable drag and drop in viewer?

Post by Elise » Tue Aug 08, 2023 8:48 pm

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

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Disable drag and drop in viewer?

Post by Fabio » Wed Aug 23, 2023 10:23 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest