Drag and Drop Upload Control


Custom Smartform Control that allows you to drag and drop attachment to your smartform.


22 replies

Hi,

 

I have configured the control as specified in the document. But still I am not able to drag and drop the files into it. It is doing nothing when I drag and drop the files into its canvas.

 

Anything I am missing?

 

Regards,

Vasaantha

Hi JK,

 

I am getting below error when I drag and drop control to view.

 

Could not find the HTML definition for the control

 

Could you please help?

 

Regards,

Vasantha

Hi,

Has there been any resolution to the 4.6.9 issue raised in the first post above?  This control worked very well under 4.6.8 but since I have upgraded to 4.6.9 using the latest version the control does not do anything when a document is dragged onto the canvas.  Any help is appreciated as this control is just what was needed.

 

Thanks,

Kirk

Badge +5

Hi All,

 

Realised that there is an issue with the control's "FullName", which should be "DragAndDropControl.DragAndDropFile.Control, DragAndDropControl" in "DragAndDropFile_Definition.xml". I've updated the package, but will need to wait for Lance to come back from leave to upload it here. Meanwhile, you can follow these steps to get things working:

 

1. If you have not added the control into any Views, you should remove the control from the system using the following command:

  "C:Program Files (x86)K2 blackpearlBincontrolutil.exe" deregister -control:DragAndDropFile

 

  The console app should reply that the control has been successfully removed. If you encounter errors specifying that the control is in use, look at point 2.

 

  After removing the control, update the source package's XML file (as stated above) and re-compile it and deploy.

 

 

2. If the control is already in use, start you SQL management studio, go to "K2" database > "Form.ControlTypeImplementation". Look for the DragAndDropControl record under the "FullName" column. Update it to ""DragAndDropControl.DragAndDropFile.Control, DragAndDropControl"

 

 

For both methods above, you will need to run IISReset to kick in the changes.

 

The current version of the control has been tested in 4.6.9 and 4.6.10.

 

Thank you.

Ji Kai.

Badge +5

If you are interested, the latest source code is always available here.

 


v1.3 - 20 July 2015
==================
- Built and tested on 4.6.10.
- Added feature to check on maximum file size before uploading to server. Note that the value is in bytes.
- Added feature to restrict file extensions that can be uploaded. Note that when the field is empty, the control allows everything. Multipe file extensions can be added and separated by ';'. e.g. txt;pdf;doc;docx
- Added read-only state for the control User can download, but cannot remove or upload new file.
- fixed disabled state. The control does not allow user to replace the file when the control is in disabled state now.
- Added feature to remove the dotted-border around the control.

Hello,

 

thank you very much for this custom control, it works fine and is also functional and usable in list views! However I would like to ask you for a small tuning if possible:)

1. Small red cross (inteded to clear the control of data) is visible only just after you dragged new file to this control. Would it be possible to have the small cross visible all the time the control is active and not in read-only or disabled state?

 

2. Would it be possible to add possibility to use d&d for attachements from Outlook?

 

Thank you in advance for your feedback and best regards!

 

Michal

Badge +2

I don't know what am I missing but it doesn't work for 4.6.11

 

please let me know if someone get it fully work for the latest versions 

 

thx

Badge +2

I changed the SourceCode.Forms DLL in the project solution with the one from my K2 bin folder

 

I was able to compile and register the control but it works only in Designer/Runtime not in Runtime/Runtime

 

 

 

any ideas please ?

 

We just upgraded to 4.7 and this control no longer works. When I used the debugger the error occured during the FileHandler.ashx step with the error:

The file could not be uploaded. Unforseen error occured on the file upload, contact your administrator.

Any ideas on why that is? The POST string is identical to what was sent by the generic file attachment control.  

I was able to figure out the issue. To make this control work with 4.7, you simply need to change the line:

data: data to data: file

in the snippet below from DragAndDropFile_Script.js 

 

$.ajax(
{
context: this,
type: 'POST',
url: '/Runtime/Utilities/FileHandler.ashx?fn=' + this._fileName + '&' + (new Date()).getTime(),
cache: false,
data: file,
contentType: false,
processData: false,
async: true
})

Register the control using controlutil.exe and restart IIS

 

Hi,

Has anyone been able to modify this control to allow multiple file upload?

@simonatbnp -  you have to add for loop in the uploadfile: function(datatransfer) method

uploadFile: function (dataTransfer)

var filecollection = dataTransfer.files;
var file;
for(i = 0; i < filecollection.length; i++)

file = filecollection;

We have noticed that when using this control if a file is uploaded that contains a "#" in the name it will throw three errors that can be seen in the event log and can cause the IIS service to stop. Has anyone else experienced this behavior?

Bytezoom Multiple File Upload control 

 

The Bytezoom Multiple File Upload control, is fully supported and includes a working sample application that you can deploy to your own server.  Check out the video: YouTube Multiple File Upload Control

I would like to drag and drop the outlook .msg file directly from outlook to this control. 

If i drag an email from outlook or attachment in an email from outlook, i am able to drop it any file folder. 

I am trying to achieve the same in this control, just by dragging an item from outlook. Is it possible by any means?

Badge +1

Did anyone already get this working with K2 Five?

below error is generated in k2 five server.whats going wrong ?

Hi Guys,

 

Any fix for K2 5?

 

Regards

Zeeshan

Hi, I woul dlike to follow up on 2 already posted questions that have not been answered yet.

 

Does this work in k2 Five?

 

Can you drag an email attachment to a k2 form with this control?

 

Thanks!

 

 

 

Hi, is there any documenation available on how to deploy this? many thanks

Badge +7

Hi,

 

We recently upgrade from 4.6.11 to 5 and drag and drop control is not working. Any one having fixes for it?

 

The Bytezoom Multiple File Upload Control works great with K2 Five, is fully supported. I also includes a working application that you can deploy to your K2 Five Server.  You can download a free 30 day trial version at: https://www.bytezoom.com/downloads/software/bzmultifilesuploadTrial.zip.

Reply