Get permanent direct link to embed in <img> (Like Share Link) - onedrive

I am uploading images to users OneDrive like this:
POST /drive/items/{folder-id}/children
So now I need to give the user a direct link to the PNG. I'm trying to get a shared link that is direct, so I can place it in <img src="HERE"> but I am having no luck. Dropbox and Google Drive offered these direct links. Does OneDrive as well?
The createLink endpoint gives a link that takes user to a page, it cannot be placed in img tag.

You should be able to generate a link according to OneDrive File Picker SDK for JavaScript, demo at
https://dev.onedrive.com/sdk/js-v6/js-picker-open.htm
Choose Download link
File #1
Filename: ASCIIfy-StarFunv2.gif
File Link: h t t p : / / public.bn1302.livefilestore.com/y3mYIAJ94eR729crwJ_B9nUg0m0tNn3BS5hhonaEz63xSmsEC-kF5Y-iN9poeWIj6QTiXLU3bI0xk8VKcTP5mTYras8b9F5hZ1eUH-wUcAqpA_4oWHbIkldd6KcXviMEb2wIPZV-HWcnpZryo0JES3mSkj6dZxtifzf0WqseXHDKdeV1t7g4SVWs1IluFazqTRq
Size: 2108 bytes
Link Type: downloadLink
Thumbnail Count: 3
"y3mYIAJ94eR729crwJ_B9nUg0m0tNn3BS5hhonaEz63xSmsEC-kF5Y-iN9poeWIj6QTiXLU3bI0xk8VKcTP5mTYras8b9F5hZ1eUH-wUcAqpA_4oWHbIkldd6KcXviMEb2wIPZV-HWcnpZryo0JES3mSkj6dZxtifzf0WqseXHDKdeV1t7g4SVWs1IluFazqTRq"
is the file name
Choose Web link
Result
File #1
Filename: ASCIIfy-Bear.gif
File Link: h t t p s : / / onedrive.live.com/redir?resid=8F99649728BEB2F3!2737&authkey=!ANtMXD2ftQHfxCs
Size: 5234 bytes
Link Type: webLink
Thumbnail Count: 3

Related

How can I access a embedded video that doesn't have a url in HTML

I was trying to clone a website so there was a video element in the page so I tried to find it and download via inspect but I it does'nt show a ref link .. it shows like it's stored in a folder or something can anyone suggest how can I download that video
this is the code embedded with video (WEBSITE: wolves (https://www.wolves.co.uk/)
CODE :
<div class="hero__video-wrapper" data-desktop-video="/media/27694/boubacar-leeds.mp4" data-desktop-video-type="video/mp4">
I tried by inspecting elements to find the video url but couldn't find any url all i found is a folder location . I was expecting to download the video for educational purposes.
"It shows like it's stored in a folder or something can anyone suggest how can I download that video"
Solution:
You're very close.
Just prepend https://wolves-cdn.azureedge.net/ to the URL shown in data-desktop-video=.
example link for your video:
https://wolves-cdn.azureedge.net/media/27694/boubacar-leeds.mp4
"I was expecting to download the video for educational purposes"
Oh shuddup and just steal the copyrighted online content already...!!!
Just joking. I'll help you cos I think that video is downloadable under "Fair Use" policy...

How to enable video from /.attachments/?

I'm gonna enable a video on Azure Wiki page. This video is not public, so I have attached it to Azure Wiki page like a image and the file was uploaded to /.attachments/ folder. Is it possible to use it during creating a vide section?
I have tried the following options but it now working as expected - it looks, the source was not recognized (Unable to play video)
::: video
/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4
:::
<video src="/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4" width=400 controls></video>
You can treat the video as any other Wiki attachment like this:
[2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4](/.attachments/2022-08-03-13-58-19-ase-e9465a68-acd2-4f73-b11a-5cc52c96d8c5.mp4)
However, it's conceivable you may loose some of the intended video functionality when you treat it as an attachment.

I need to display a pdf in my google drive as a thumbnail ,in a google sheet..how to do it Using google script?

I have a folder in google drive which contains pdfs. Some of them contain images and some do not. I need to display each of those pdf files as thumbnails in a google sheet using a google script. Please help me if you know any method to do it...
You can create Thumbnail of pdf file and save it to drive.
If you want resize thumb, you can use thumbnailLink.
Read file pdf to get thumbnail:
var file = DriveApp.getFileById('xxxx- file id');
Get thumbnail blob:
var thumbBlob = file.getThumbnail();
Save thumbnail to Drive:
var res = Drive.Files.insert({title: "temp.jpg"}, thumbBlob);
Get thumbnailLink:
Logger.log(file.thumbnailLink);
The thumbnailLink is https:// lh3.googleusercontent.com/.....=s220. You have to change 220 to your desired width.

Adding a pdf file instead of an image in the joomla mediamanager

I would like to add a pdf file to the joomla media manager, and then select it as a full article image, so that I can get the link using json and echo it for every product, without having to manually add a pdf link every time.
However when I want to link the pdf file to an article, and browse to the folder where the pdf file is located, it says: 'No images found'.
Is it possible to add pdf files to an article instead of an image, using the media manager?
This is where I browse to my pdf file:
https://i.gyazo.com/8ef91fc2d1ea26a36abcfb22bcc0cd25.png
Hello #twan,
I can see only solution to your question is : PDF Embed Plugin from Techjoomla
Try using this extension and let me know if it works for you or not.
Thanks,
Mrunal.

Tumblr API2: Create A Photo Post with several Images

Hi I have read the docs here:
http://www.tumblr.com/docs/en/api/v2#posting
I know how to upload one pic via the The photo 'source' URL parameter. like:
source: 'http://www.example.com/example.jpg'
How can I upload several pics in one photo post?
Thanks a lot!
Did you see this on the API page link for photo uploads?
data Array (URL-encoded binary contents) Limit: 5 MB
You would pass in an array containing the image links containing the multiple values as data instead of a single source file.