How to upload file for SharePoint online using Javasript & RestAPI? - javascript

Currently, I am trying to create API so that, I will upload a test file to specific folder in SharePoint by using JavaScript with the help of REST API. But hard luck. Please let know any solution and suggestions.

you can check this resource.Using jquery

Related

upload file to google drive and share link using php

I want to write php code to upload files to google drive and share link. I need to integrate this to my website. so users can upload files to google drive and once they uploaded I can receive file link.
is this possible? are there any github sources to start? I am seeking help to get right start. please advice if anyone has done this before?
I understand that you want to write a PHP code to get the file link from data uploaded to Drive. If that is true, then you should explore the Drive API PHP reference. You can see an example code in the Drive API quickstart and use it as a model.
To get the data from the uploaded file you can use get and read the variables webContentLink and/or webViewLink (for the download link and the view link, respectively). Please, remember to use * on the request parameter fields to receive all the data. Don't hesitate to ask me further questions to help you better.

I have requirement to generate HTML to PDF and save the PDF to SharePoint Document Library using Javascript

We have one requirement where we need to generate HTML to PDF and store it on document Library.
So far we are able to generate the HTML to PDF but not able to store it in SharePoint Document Library.
Note: we are using kendo plugin for PDF conversion, Kendo giving SaveAs option to save the PDF locally, our requirement to store the PDF in SharePoint Environment.
Code Snipped:
kendo.drawing.pdf.saveAs(“PDFName”)
If anyone did similar requirement in past Please revert back to me.
We are Interested to achieve the solution with Client side programming. MS flow is not in scope as of now.
You could upload the file to sharepoint library via rest api:
create a file and add it to a folder.
And below is a sample:
How to Upload File in Document Library in SharePoint Using REST API & jQuery

How can i upload a file by using the download link to the file

I am setting up a file viewer to work with another web application, and to make it more user friendly instead of making the user download and upload the file themselves, i want to pass the download link to upload(if anyone has experience with alfresco and know how to get the file itself please tell me), is there any way to do that?
You might want to take a look at the Alfresco REST API. Specifically, getNodeContent allows you to get the content on a node.
This API requires Alfresco 5.2 or higher. If you are using an older version, please specify.

Creating PDF file from remote URL with jsPDF

I'm struggling with this problem for quite a while and wanted to ask for help.
I'm trying to generate a PDF file from a remote URL in PHP.
for example from mysite.com?id=12 so when I click on this link the browser's pdf viewer opens with the contents of this URL including all styles etc.
I've tried it with jsPDF javascript library but it seems that it can't be used for remote URLs. I also found tons of libraries which all need API keys ( registration, subscription, payment ....).
I don't want to ask for code samples but just for instructions on which library is able to do that and the workflow.
Thanks in advance.
I believe you might find mPDF useful. https://github.com/mpdf/mpdf.
There is good documentation https://mpdf.github.io/ and even some examples in another GitHub repository https://github.com/mpdf/mpdf-examples.
You can use html and css to generate a nice looking PDF.

Angular:-Save Angular js file as a Html file and push the file on server

A simple question..
I have to save some specific contents(body) of an angular file and then save the file as an HTML file if possible..Also as soon as the file is saved want to push it to the server..
Any idea about how to implement the above..
Is snapshot feature I read about in some tutorials using Grunt help me achieve the same (https://github.com/cburgdorf/grunt-html-snapshot)..
Just wanted to understand what's the best way to implement the same and whether it is possible to do so..Thanks for the help

Categories

Resources