SlideShare ist ein Scribd-Unternehmen logo
1 von 25
User interface components built
with React (JavaScript library).
Authentication and token agnostic:
Works with JWT / OAuth.
User type agnostic: Works with
app, managed, and unmanaged
users.
2
3
Works with both mobile (through
React Native) and non-mobile
environments.
Responsive design implementation
to function in any size /
environment.
Token Downscoping
Server-side
Super token
Client-side
Limited token
UI Element
Component
Token Exchange, Box Node SDK
The UI Elements
base_explorer
Ability to view files and folders
item_preview
Preview file contents (Content Preview)
item_download
Download files and folders
item_rename
Rename files and folders
item_share
Provide a share button option
item_delete
Ability to delete files and folders
9
<div class='container' style='height:600px'></div>
<script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/explorer.js'></script>
<script type='text/javascript'>
var folderId = '34007816377';
var accessToken = '1!Cf1gy8gP59bHZBoxwJVd3rXeKs6...';
var contentExplorer = new Box.ContentExplorer();
contentExplorer.show(folderId, accessToken, {
container: '.container'
})
</script>
Creating a Simple Content Explorer Element
// Display functionality
contentExplorer.show(folderId, accessToken, options);
contentExplorer.hide();
// Force reload
contentExplorer.clearCache();
// Listeners - select, rename, preview, download,
// delete, upload, navigate, create
contentExplorer.addListener(eventName, listener);
contentExplorer.removeListener(eventName, listener);
contentExplorer.removeAllListeners();
Content Explorer Methods
base_picker
Ability to select files and folders
item_share
Adjust share settings for files and
folders
item_upload
Include ability to upload new content
(Content uploader)
13
<div class='container' style='height:600px; '></div>
<script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/picker.js'></script>
<script type='text/javascript'>
var folderId = '34007816377';
var accessToken = '1!mgMlen0nWaJvCOeUTRw1w-ADO1-WvW8jsr...';
var filePicker = new Box.FilePicker();
filePicker.show(folderId, accessToken, {
container: '.container'
})
</script>
Creating a Simple Content Picker Element
// Display functionality
filePicker.show(folderId, accessToken, options);
filePicker.hide();
// Force reload
filePicker.clearCache();
// Listeners - choose, cancel
filePicker.addListener(eventName, listener);
filePicker.removeListener(eventName, listener);
filePicker.removeAllListeners();
Content Picker Methods
base_preview
Ability to preview files
item_download
Button available to download the file
annotation_edit
Users can edit annotations
annotation_view_all
Allow users to view all annotations
annotation_view_self
Allow users to only view their own
annotations
17
<script src='https://cdn01.boxcdn.net/platform/preview/1.2.1/en-US/preview.js'></script>
<div class='container' style='height:400px; width:100%;'></div>
<script type='text/javascript'>
var fileId = '204496637878';
var accessToken = '1!ODmIRfdbEVZBB-IG4Pv2TWMvqog7jbJvnSEdgtJ-qlw708UXK-i...';
var preview = new Box.Preview();
preview.show(fileId, accessToken, {
container: '.container',
showDownload: true
});
</script>
Creating a Simple Content Preview Element
// Display functionality
preview.show(fildId, accessToken, options);
preview.hide();
// Actions
preview.print();
preview.download();
preview.resize();
// Listeners - ex. destroy, load, notification, navigate,
// reload, resize, zoom, printsuccess
// https://developer.box.com/docs/file-types-events
preview.addListener();
preview.removeListener(eventName, listener);
preview.removeAllListeners();
Content Preview Methods
base_upload
Allows users to choose content from their
devices and upload to your app and Box
instance.
21
<script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/uploader.js'></script>
<div class='container' style='height:600px;'></div>
<script type='text/javascript'>
var folderId = '34007816377';
var accessToken = '1!yE28H_Q3KN4hvT2lJB_OrDHkmFn2S7U8pfC--Nj6a...';
var uploader = new Box.ContentUploader();
uploader.show(folderId, accessToken, {
container: '.container'
});
</script>
Creating a Simple Content Uploader Element
// Display functionality
uploader.show(folderId, accessToken, options);
uploader.hide();
// Listeners - close, complete
uploader.addListener(eventName, listener);
uploader.removeListener(eventName, listener);
uploader.removeAllListeners();
Content Uploader Methods
Demo
Github Source: http://bit.ly/bwelements
Understanding Box UI Elements

Weitere ähnliche Inhalte

Was ist angesagt?

MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
Paulo Rodrigues
 

Was ist angesagt? (20)

DevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit TestsDevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit Tests
 
File upload vulnerabilities & mitigation
File upload vulnerabilities & mitigationFile upload vulnerabilities & mitigation
File upload vulnerabilities & mitigation
 
Cyber Threat Modeling
Cyber Threat ModelingCyber Threat Modeling
Cyber Threat Modeling
 
JSON Web Tokens
JSON Web TokensJSON Web Tokens
JSON Web Tokens
 
Honeypot 101 (slide share)
Honeypot 101 (slide share)Honeypot 101 (slide share)
Honeypot 101 (slide share)
 
So you want to be a red teamer
So you want to be a red teamerSo you want to be a red teamer
So you want to be a red teamer
 
MITRE ATT&CKcon 2018: Summiting the Pyramid of Pain: Operationalizing ATT&CK,...
MITRE ATT&CKcon 2018: Summiting the Pyramid of Pain: Operationalizing ATT&CK,...MITRE ATT&CKcon 2018: Summiting the Pyramid of Pain: Operationalizing ATT&CK,...
MITRE ATT&CKcon 2018: Summiting the Pyramid of Pain: Operationalizing ATT&CK,...
 
Web application security
Web application securityWeb application security
Web application security
 
Mobile Security at OWASP - MASVS and MSTG
Mobile Security at OWASP - MASVS and MSTGMobile Security at OWASP - MASVS and MSTG
Mobile Security at OWASP - MASVS and MSTG
 
Bear Hunting: History and Attribution of Russian Intelligence Operations
Bear Hunting: History and Attribution of Russian Intelligence OperationsBear Hunting: History and Attribution of Russian Intelligence Operations
Bear Hunting: History and Attribution of Russian Intelligence Operations
 
MITRE ATT&CKcon 2018: ATT&CK as a Teacher, Travis Smith, Tripwire
MITRE ATT&CKcon 2018: ATT&CK as a Teacher, Travis Smith, TripwireMITRE ATT&CKcon 2018: ATT&CK as a Teacher, Travis Smith, Tripwire
MITRE ATT&CKcon 2018: ATT&CK as a Teacher, Travis Smith, Tripwire
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Applying OWASP web security testing guide (OWSTG)
Applying OWASP web security testing guide (OWSTG)Applying OWASP web security testing guide (OWSTG)
Applying OWASP web security testing guide (OWSTG)
 
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT Devices
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerability
 
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS FilterX-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
 
Soc analyst course content v3
Soc analyst course content v3Soc analyst course content v3
Soc analyst course content v3
 
Mapping to MITRE ATT&CK: Enhancing Operations Through the Tracking of Interac...
Mapping to MITRE ATT&CK: Enhancing Operations Through the Tracking of Interac...Mapping to MITRE ATT&CK: Enhancing Operations Through the Tracking of Interac...
Mapping to MITRE ATT&CK: Enhancing Operations Through the Tracking of Interac...
 
MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
MODERNIZAÇÃO DE SISTEMAS LEGADOS: um estudo de caso sobre integração de siste...
 

Ähnlich wie Understanding Box UI Elements

Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
Fermin Galan
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocial
Thomas Roger
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
helenmga
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 
Design and implement Java program as follows- 1) Media hierarchy- Cre.pdf
Design and implement Java program as follows- 1) Media hierarchy-  Cre.pdfDesign and implement Java program as follows- 1) Media hierarchy-  Cre.pdf
Design and implement Java program as follows- 1) Media hierarchy- Cre.pdf
Jake3sTAveryn
 

Ähnlich wie Understanding Box UI Elements (20)

Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
Nuxeo - OpenSocial
Nuxeo - OpenSocialNuxeo - OpenSocial
Nuxeo - OpenSocial
 
08ui.pptx
08ui.pptx08ui.pptx
08ui.pptx
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
Build your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJSBuild your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJS
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Local Storage
Local StorageLocal Storage
Local Storage
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
 
Oracle Endeca Developer's Guide
Oracle Endeca Developer's GuideOracle Endeca Developer's Guide
Oracle Endeca Developer's Guide
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
Design and implement Java program as follows- 1) Media hierarchy- Cre.pdf
Design and implement Java program as follows- 1) Media hierarchy-  Cre.pdfDesign and implement Java program as follows- 1) Media hierarchy-  Cre.pdf
Design and implement Java program as follows- 1) Media hierarchy- Cre.pdf
 
Android App Development (Basics)
Android App Development (Basics)Android App Development (Basics)
Android App Development (Basics)
 
Yii in action
Yii in actionYii in action
Yii in action
 
Java EE Services
Java EE ServicesJava EE Services
Java EE Services
 
Softshake - Offline applications
Softshake - Offline applicationsSoftshake - Offline applications
Softshake - Offline applications
 
Android development with Scala and SBT
Android development with Scala and SBTAndroid development with Scala and SBT
Android development with Scala and SBT
 

Mehr von Jonathan LeBlanc

Mehr von Jonathan LeBlanc (20)

JavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the ClientJavaScript App Security: Auth and Identity on the Client
JavaScript App Security: Auth and Identity on the Client
 
Improving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data InsightsImproving Developer Onboarding Through Intelligent Data Insights
Improving Developer Onboarding Through Intelligent Data Insights
 
Better Data with Machine Learning and Serverless
Better Data with Machine Learning and ServerlessBetter Data with Machine Learning and Serverless
Better Data with Machine Learning and Serverless
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with Box
 
Box Platform Overview
Box Platform OverviewBox Platform Overview
Box Platform Overview
 
Box Platform Developer Workshop
Box Platform Developer WorkshopBox Platform Developer Workshop
Box Platform Developer Workshop
 
Modern Cloud Data Security Practices
Modern Cloud Data Security PracticesModern Cloud Data Security Practices
Modern Cloud Data Security Practices
 
Box Authentication Types
Box Authentication TypesBox Authentication Types
Box Authentication Types
 
Understanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scopingUnderstanding Box applications, tokens, and scoping
Understanding Box applications, tokens, and scoping
 
The Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments GloballyThe Future of Online Money: Creating Secure Payments Globally
The Future of Online Money: Creating Secure Payments Globally
 
Modern API Security with JSON Web Tokens
Modern API Security with JSON Web TokensModern API Security with JSON Web Tokens
Modern API Security with JSON Web Tokens
 
Creating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from ScratchCreating an In-Aisle Purchasing System from Scratch
Creating an In-Aisle Purchasing System from Scratch
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data Security
 
PHP Identity and Data Security
PHP Identity and Data SecurityPHP Identity and Data Security
PHP Identity and Data Security
 
Secure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication MediaSecure Payments Over Mixed Communication Media
Secure Payments Over Mixed Communication Media
 
Protecting the Future of Mobile Payments
Protecting the Future of Mobile PaymentsProtecting the Future of Mobile Payments
Protecting the Future of Mobile Payments
 
Future of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable SecurityFuture of Identity, Data, and Wearable Security
Future of Identity, Data, and Wearable Security
 
Kill All Passwords
Kill All PasswordsKill All Passwords
Kill All Passwords
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 

Understanding Box UI Elements

  • 1.
  • 2. User interface components built with React (JavaScript library). Authentication and token agnostic: Works with JWT / OAuth. User type agnostic: Works with app, managed, and unmanaged users. 2
  • 3. 3 Works with both mobile (through React Native) and non-mobile environments. Responsive design implementation to function in any size / environment.
  • 8.
  • 9. base_explorer Ability to view files and folders item_preview Preview file contents (Content Preview) item_download Download files and folders item_rename Rename files and folders item_share Provide a share button option item_delete Ability to delete files and folders 9
  • 10. <div class='container' style='height:600px'></div> <script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/explorer.js'></script> <script type='text/javascript'> var folderId = '34007816377'; var accessToken = '1!Cf1gy8gP59bHZBoxwJVd3rXeKs6...'; var contentExplorer = new Box.ContentExplorer(); contentExplorer.show(folderId, accessToken, { container: '.container' }) </script> Creating a Simple Content Explorer Element
  • 11. // Display functionality contentExplorer.show(folderId, accessToken, options); contentExplorer.hide(); // Force reload contentExplorer.clearCache(); // Listeners - select, rename, preview, download, // delete, upload, navigate, create contentExplorer.addListener(eventName, listener); contentExplorer.removeListener(eventName, listener); contentExplorer.removeAllListeners(); Content Explorer Methods
  • 12.
  • 13. base_picker Ability to select files and folders item_share Adjust share settings for files and folders item_upload Include ability to upload new content (Content uploader) 13
  • 14. <div class='container' style='height:600px; '></div> <script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/picker.js'></script> <script type='text/javascript'> var folderId = '34007816377'; var accessToken = '1!mgMlen0nWaJvCOeUTRw1w-ADO1-WvW8jsr...'; var filePicker = new Box.FilePicker(); filePicker.show(folderId, accessToken, { container: '.container' }) </script> Creating a Simple Content Picker Element
  • 15. // Display functionality filePicker.show(folderId, accessToken, options); filePicker.hide(); // Force reload filePicker.clearCache(); // Listeners - choose, cancel filePicker.addListener(eventName, listener); filePicker.removeListener(eventName, listener); filePicker.removeAllListeners(); Content Picker Methods
  • 16.
  • 17. base_preview Ability to preview files item_download Button available to download the file annotation_edit Users can edit annotations annotation_view_all Allow users to view all annotations annotation_view_self Allow users to only view their own annotations 17
  • 18. <script src='https://cdn01.boxcdn.net/platform/preview/1.2.1/en-US/preview.js'></script> <div class='container' style='height:400px; width:100%;'></div> <script type='text/javascript'> var fileId = '204496637878'; var accessToken = '1!ODmIRfdbEVZBB-IG4Pv2TWMvqog7jbJvnSEdgtJ-qlw708UXK-i...'; var preview = new Box.Preview(); preview.show(fileId, accessToken, { container: '.container', showDownload: true }); </script> Creating a Simple Content Preview Element
  • 19. // Display functionality preview.show(fildId, accessToken, options); preview.hide(); // Actions preview.print(); preview.download(); preview.resize(); // Listeners - ex. destroy, load, notification, navigate, // reload, resize, zoom, printsuccess // https://developer.box.com/docs/file-types-events preview.addListener(); preview.removeListener(eventName, listener); preview.removeAllListeners(); Content Preview Methods
  • 20.
  • 21. base_upload Allows users to choose content from their devices and upload to your app and Box instance. 21
  • 22. <script src='https://cdn01.boxcdn.net/platform/elements/1.0.2/en-US/uploader.js'></script> <div class='container' style='height:600px;'></div> <script type='text/javascript'> var folderId = '34007816377'; var accessToken = '1!yE28H_Q3KN4hvT2lJB_OrDHkmFn2S7U8pfC--Nj6a...'; var uploader = new Box.ContentUploader(); uploader.show(folderId, accessToken, { container: '.container' }); </script> Creating a Simple Content Uploader Element
  • 23. // Display functionality uploader.show(folderId, accessToken, options); uploader.hide(); // Listeners - close, complete uploader.addListener(eventName, listener); uploader.removeListener(eventName, listener); uploader.removeAllListeners(); Content Uploader Methods

Hinweis der Redaktion

  1. Be careful about load order of the .js file – placing before the div will cause a react-modal error
  2. Event types depends on the type of file being previewed (loads a different view type)