How to upload a custom thumbnail for a SharePoint document - sharepoint

How do I upload custom thumbnails for document formats not managed by SharePoint?
This page of the Graph documentation says that it is possible to "Upload a custom thumbnail for an item", shows how to download standard and custom thumbnails, but doesn't say how to upload one.
This post talks about the folder _t containing the custom thumbnails, but I haven't found any documentation of that folder.

Try this endpoint:
PUT /drive/items/{item-id}/thumbnails/0/source/content
Note: Custom thumbnails are only available on OneDrive Personal.
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_thumbnailset_content?view=odsp-graph-online

Related

how to upload a photo in acumatica using put

I just want to ask if it is possible to upload or attach a file in a contact using rest API I can currently put a new contact in Acumatica using put. My question now is can I also attach a link for its file like url/cloudstorage/image.jpg. I want to put it on file and be an image for the new contact
You need to make a separate PUT call to upload the image and append entity key/files/image_filename to the URL:
http://localhost/AcumaticaDB/entity/Default/18.200.001/StockItem/AALEGO500/files/Sample.jpg
With REST API you can currently only upload files to master entity (form/header).
If you need to attach files to detail entities you need to create a custom maintenance screen for the detail entity and extend the webservice endpoint to add that custom screen. Essentially it creates a master screen for the detail.
Reference:
https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=591def3d-5fe5-42c1-bb35-cfe5b4c77f6f

Create PDF file with pre-defined template

I am trying to create a PDF with the pre-defined template with this particular library called PDFKIT. The server is written in Nodejs, may I know is there any good example I could refer to? What I want to achieve is to have a User Interface as an entry form, and then there is a pre-defined PDF file in-place on the server.When the user hits the submit button, the pdf rendering engine will pick-up the data and embedded into the pdf template file.
Take a look at the PSPDFKit for Web / PSPDFKit Server API docs for handling forms which let you retrieve and update all form fields. You can then use the document APIs for downloading a PDF with the form fields set to whatever values your user submitted.
So to recap, the steps are:
Upload the template PDF to the server storing the document id in your database or in the user's session.
Fill in the form fields using the data your user submitted.
Download the PDF with the updated form fields and e.g. email it or store it somewhere.
Alternatively you can create a signed URL so that you can directly redirect your user to the generated PDF.
Have you heard about PhantomJS? There is a package which name is phantom-html-to-pdf. You may give it a try.

Uploading Image to SharePoint from PowerApps via Flow

As the title says.. I'm building a power app that uploads an image to a sharepoint directory.
Following this blog I was able to successfully upload an image that was captured by a Camera Control.
However, I would like to do the same thing but with an 'Add Picture' Control.
My PowerApp function for doing this is
ClearCollect(PictureCollection2, AddMediaButton2.Media);
MediaToSharePoint.Run("test.png", First(PictureCollection2).Value)
I add the media to a collection, then Run a Flow with the value. This value is a form of a URL that contains the image stored as a blob. Here's an example of the value that gets passed to the Flow
blob:https://create.powerapps.com/79d7f767-4dff-448d-87ec-b3d2f7cdf27d
The flow has two steps; a PowerApp connector and a Share Point Create File
The flow is failing on the second step with a 'Bad Request' error.
Has anyone been able to upload an image to Sharepoint via an 'Add Picture' control?
Any help would be appreciated, let me know if there are any more details I should provide.
We were able to solve the problem by saving pictures to a SharePoint List.
Here are useful links explaining the solution.
"Save Attachments to SharePoint List using PowerApps" (YouTube Video)
"Add attachments to SharePoint lists" (Blog Post)
"Showing List Attachments in a gallery" (Forum Thread)
It's working!

Netsuite - using Suitescript attach a image from file cabinet to custom record attachments

I currently have a custom record which have the image field where the end user can upload one image. Now my end user want to attach multiple images, so we have turned on attachments (files tab) and want to run a scheduled script to move the current image from the image field to file tab?
According to my research there is no files suitescript Api, so is it possible to do this with suitescript?
nlapiAttachRecord("file", imagefieldvalue, "customerecordid", recordid);

Google Docs Viewer with Amazon S3 PDF Link Error

I am attempting to use GoogleDocs Viewer to embed a PDF on my webpage.
This is the link that was generated but I keep getting an error:
Sorry, we are unable to retrieve the document for viewing or you don't have permission to view the document. Please try again later.
Can google not handle S3 docs?
Google Docs Viewer has a limit of 2 Mb for PDF files.
If your document is larger than that you will get this error.

Resources