Upload a file in folder and reference it in other folders like sharepoint referencing

We have folders named A,B,C,D,E,F and we upload a file test.txt in folder A

we want to provide a link/any possible way to access test.txt file from folders C,D,E. We are looking for a feature similar to referencing in Sharepoint(https://support.office.com/en-us/article/add-a-link-in-a-document-library-346b1eb9-1e71-4155-80ca-f868d058a56a)

2. is it possible to replace the file instead of creating new copy when user uploads a new file with the same name which already exists in a folder? Please let us know

Thank you

6 Replies

SP Sowmiya Padmanaban Syncfusion Team February 14, 2020 11:42 AM UTC

Hi Mahesh,  
 
Greetings from Sycnfusion support. 
 
Query 1 – Share the Reference. 
 
While uploading the file, you can get the uploaded file details in server side upload operation. You can save the file details as a reference. While navigating to the another folder, read operation (GetFiles() operation) will trigger in the server side. In that operation, you can add the uploaded file in corresponding folder. We have already shared a sample how to override the getFiles() operation in  FileManager component. Refer the forum 151112 link.  
 
Additional information:  In client side, fileOpen() will trigger on folder navigation. If you want to sent the custom parameter use beforeSend() event. 
 
Query 2 – Upload a file with same name. 
 
We have checked your reported query. Currently, we have not provided support for upload the same file name in SQL File Provider.  But we have this support in below file provider. 
 
1.      ASP.NET Core File Provider 
2.      ASP.NET MVC Azure File Provider 
 
You can refer the below links. 
 
 
 
Refer the below code snippet for ASP.NET CORE file provider. 
 
  else if (action == "keepboth") 
                        { 
                            string newName = fullName; 
                            int index = newName.LastIndexOf("."); 
                            if (index >= 0) 
                                newName = newName.Substring(0, index); 
                            int fileCount = 0; 
                            while (System.IO.File.Exists(newName + (fileCount > 0 ? "(" + fileCount.ToString() + ")" + Path.GetExtension(name) : Path.GetExtension(name)))) { fileCount++; } 
                            newName = newName + (fileCount > 0 ? "(" + fileCount.ToString() + ")" : "") + Path.GetExtension(name); 
                            using (FileStream fs = System.IO.File.Create(newName)) { file.CopyTo(fs); fs.Flush(); } 
                        } 
} 
 
You can try to achieve your requirement based on this reference. In the meanwhile, we will implement this feature in our SQL ASP.NET Core provider and will include it in our February last week patch release which is expected to be released at end of February. Please be patience, until then. 
 
 
Please, get back to us if you face any issue while implementing this requirement. we will be happy to assist you. 
 
Regards,  
Sowmiya.P 



UN Unknown Syncfusion Team February 14, 2020 12:10 PM UTC

Thank you Sowmiya for quick response.

We also thought in the same lines and we are already in the process of exploring these events to acheive our Reference requirement. 

Do you have any plans in future to embed this feature in your upcoming releases. Please let us know


SP Sowmiya Padmanaban Syncfusion Team February 17, 2020 06:26 AM UTC

Hi Mahesh,  
 
We have validated your requirement. We would like to let you know that your requirement can be achieved with EJ2 FileManager using its available properties, events and methods. So, we have no plan to implement this as a feature in the component.  
 
Though, we have considered to prepare similar customization demo samples with File Manager. We will either add this customization content in our UG documentation or KB for user references.   
 
Please, get back to us if you face any issue while implementing this sample, you will happy to assist. 
 
Regards,  
Sowmiya.P 



SP Sowmiya Padmanaban Syncfusion Team February 26, 2020 07:05 AM UTC

Hi Mahesh,  
 
We are glad to announce that patch release (v17.4.51) is rolled out successfully. In this release, we have included a fix for “Upload customization in SQL Provider”. To access this fix, We suggest you to download the below service link. 
 
 
 
Note: Run the service and refer the localhost URL in FileManager sample. 
 
Currently, this changes not included in our GitHub Repository. It will be included in our Volume 1 Release. Until then, use the above service for your requirement.   
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,  
Sowmiya.P 



UN Unknown Syncfusion Team February 26, 2020 08:16 AM UTC

Hi Sowmiya,

We acheived our requirement(upload in one folder and reference it in anohter foldes). I have a question on license, not sure this is right forum to ask

1. we dediced to purchase asp.net mvc,core package for 1year,1 developer. we are expecting to deploy our application in sep,2020
we will deploy our product before license expires, do we need to upgrade our subscription after  1 year?

we are not going to development after 1 year   


MP Mike Peevy Syncfusion Team February 28, 2020 11:42 AM UTC

Mahesh,
As long as you are not doing anymore deployment, updates, or patches to the product after your license expires, you would not need to renew your subscription after the 1 year.

Loader.
Up arrow icon