How can I download a OneDrive file with Office365 REST API into a Ruby variable? -


i'm building ruby on rails app, , i'd integrate office365 features.

for instance : download file onedrive , attach email in order send via outlook rest api.

i found get item content onedrive rest api dont understand how use it.

i understand have send request (formated explained in msdn.microsoft.com) rails, provide me "a pre-authenticated download url" download file.

then have send second request a pre-authenticated download url start download, don't understand how deal response in order save file variable.

how can retrieve file variable of ruby on rails app, can attach email outlook rest api send own rail controller ?

also workflow not optimized in term of bandwidth , processing (3 rest api request + 1 download + 1 upload), work.

however if exist single rest api direclty attach onedrive file email send it, ease lot life, save energy, save money microsoft datacenter, , spare planet ecology.

any tutorial, examples, or more explanatory doc appreciated.

--- edit --- adding link email not wished email may have send outside of office365 users, , public link security issue confidential documents.

any welcome.

there isn't single rest api call can make want, although being able attach file onedrive new email message great scenario microsoft graph api, isn't supported right now.

if want attach file, need mentioned, download contents of file, , upload again attachment message.

however, i'd recommend sending link file instead, though mentioned don't want that. onedrive business supports "company shareable links" scoped user's organization instead of being available totally anonymously.

something else consider: security concerns of sending anonymous link aren't different sending attached file. in fact, anonymous link can more secure, because access file can monitored , revoked in future (unlike attachment, out there).


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -