How to disable drag and drop of folders but not files in SharePoint online Document library? - drag-and-drop

I am using SharePoint online. I have a requirement, in the Document Library users are not allowed to drag and drop folders but they can drag and drop files.
If a folder is dragged I need to show a warning.
How can we achieve this? I was trying with SPFx but had no luck. Can I add event listener to detect folder drop before it is dropped?.
Any suggestion to achieve this would be really helpful

Not sure if this is achievable. You might want to have a look into this:
How can I disable the Document Library drag and drop function?
Also you can read this ms doc:
Information about dragging files into document libraries in SharePoint Server 2013 or SharePoint Online by using a web browser

Related

No reaction when dragging into Access form

This post Drag file into Access, how to check the file details? says a BoundObjectFrame can be used as a target to drag and drop files from the Windows Explorer.
I've tried putting one on a form, but when I drag a file onto it, I get the circle-and-slash symbol that says I can't.
I've also tried various other control, including MS Forms textboxes, which are supposed to support drag-and-drop. But in every case I get the symbol.
Can anyone explain why?

Drag and Drop in Office JS page to Word Document

I am creating an online office add-in for the Word application. I have created an HTML page with some fields like, Name, Address, Mobile etc.
On drag and drop of such a field I want to create a MergeField in Word Document.
I have done R&D regarding drag and drop but I am not able to find how to control a drop event outside of the container.
Is there any way to fulfill my requirement?
Due to browser limitations we don’t currently support drag and drop from the taskpane to the word surface.
But what many developers have implemented is a ‘+’ button to add items into the document, or other sorts of events like dbl click.

SharePoint 2013 Powershell - Moving Document Liobrary to New Site Collection

I am trying to move document libraries, from one site collection to another and retain of the metadata such as Modified By, Date Modified etc.
I have tried using the 'move' function within SharePoint 2013 Content and Structure but unfortunately this doesn't extend to across site collections.
I have tried multiple PowerShell scripts they successfully copy the file from one Site Collection to another but do not retain the metadata.
Any ideas, would be greatly appreciated.
Thanks.
have you tried saving the library as a template? You can mark the template to keep the contents.
Then you can deploy a new library from that template (Site actions / More options / Template name), and after that delete the template.
Additionally you can move it between servers. Go to the Site settings, there to the template gallery and download the template you just created. Now you can move it to another server or application.
Hope it helps.
Take a look at the SharePoint migration tools. Some of them offer free trials for limited amounts of data.

Dynamic data manipulation in word online

I am trying to build a task-pane add-in for word online which can do mail merge like desktop office. Now I understand that word online does not support mail merge out of the box, so I thought about the following steps -
Create a template (DOTX) using desktop office which will contain Region or something like a merge field etc. Upload the template to one drive.
Open a blank doc and add a task pane add-in in word online. This is temporary step for now.
Click a button on the add-in.
This click will stream the template (DOTX) from server using an app service call.
Render the stream into word online web page.
Edit and save.
Close word online and reopen.
Click the doc link.
This will render the doc in word online.
Add the add-in in the task pane (temp step).
Click edit button.
Call app service to fetch the latest merge data source.
Traverse through the word xml and replace the values corresponding to the region or special keys.
Re-render the doc.
My users will have E1 subscription of office 365.
Is this thought process logical and achievable with word online? Thanks in advance!...
I think your approach is much more complicated than it needs to be. Word Online supports Add-ins created using the JavaScript APIs, as supported by the information in this article: https://msdn.microsoft.com/EN-US/library/office/dn833104.aspx
It should be possible for you to create the "template" on the Desktop (Word 2013 or 2016 is required - but only 2016 supports the current full scope of the JS API) and "insert" your add-in, which links it to the document. Opening the document in Word online should automatically load the add-in, that can then link to the data source and fill in the data.
As data targets ("merge fields"), I recommend you use Content Controls.

Create a "tags" in filebrowser

I would like my admins to be able to upload files to the website. And I need to give those files some meta data so we can filter and display related files on the frontend. Can someone offer me a good workaround to do this?
I myself have struggled with this for many weeks. I can create a new taxonomy structure and with it a view to manage all the content or I can work with existing modules (but they don't meet my expectations).
Are there hooks available to "hack" into the filebrowser, so we can select the display of files on tags?
Check out http://drupal.org/project/media and http://drupal.org/project/file_entity Media has views integration and file_entity makes files fieldable.