Link to home
Start Free TrialLog in
Avatar of tommelkonian
tommelkonian

asked on

How to create a form which uploads files to a Sharepoint folder?

I need to create a public web form where users can upload a file to a folder on our organization's MS Sharepoint system.

Our website is running on the DNN 9 CMS (DotNetNuke) , so I would ideally like to be able to use their web form plugin (DNN Sharp Action Form) to make the form, but it could also be a .net web form, or a web page. I'm told that Sharepoint has an API called REST which I might use to upload files to a Sharepoint folder.

Does anyone have experience with this type of thing, I'm not yet familiar with Sharepoint.

Thanks for any info you might be able to share.

Tom
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

It is very easy using SharePoint CSOM and seeing that you are DotNetNuke you should be able to use it.
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code

Worse case you can write a Windows Services or the like that can act as middle-ware
Avatar of tommelkonian
tommelkonian

ASKER

Thanks for your responses. It looks as though this is possible using javascript/jQuery, or asp.Net / C.
If possible I'd prefer to try the javascript way, do you know whether there are adavntages/ drawbacks to one approach or the other?

Thanks again for the info.

Tom
No drawbacks with JS, just a little more complex
Thanks.

I'm not very expert in .NET. But if I used your suggestion, would I be able to run it from a DNN plugin (Action Form), or would it mean creating a new .NET web application? I'm having trouble knowing how to choose which method and which Sharepoint API to use.

I'm thinking maybe it could be done using DNN Action Form plugin (which would provide the online form fields and upload) . Action form provides a way to run javascript code after gathering the user input / file upload. So I'm thinking that might be a simple way to achieve this, but I'm not sure whether that will work or not.

The form where people can upload the file needs to be open to the public. It could be on our DNN website (using the Action Form plug in), or in it's own application (our  orgnization uses C# .NET framework) . It needs to be able to specify the naming for the uploaded file.
The file needs to be uploaded to a location on our organization's Sharepoint, which will only be accessible by certain members of our staff.

I don't have much experience in C# .NET programming, a bit more with Javascript. But if this is over my head, there are others here who do C# .NET.

Thanks again for any insight.

Tom
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.