GithubHelp home page GithubHelp logo

box-content-preview-demo's Introduction

Demo host app for the Box Content Preview UI Element

This demo app demonstrates how to use the Box Content Preview UI Element from within a React based application. The UI Elements require an access token to work. This demo however does not demonstrate how to do authentication in your app. For authentication and generating tokens please follow https://developer.box.com/docs/authentication instead.

Setup

  1. Clone this repo via git clone [email protected]:box/box-content-preview-demo.git.
  2. Add auth token to src/index.js.
  3. Run yarn start to run the webpack dev server.
  4. Navigate to http://localhost:8080.

Note: The above instruction steps assume webpack dev server is running on port 8080. If it runs on another port, you will have use that instead in the instructions above.

Important Files

How to import the Preview UI Element - index.js Webpack rules - webpack.config.js Babel config - .babelrc Packages and dependencies - package.json

Questions

If you have any questions, please visit our developer forum or contact us via one of our available support channels.

Copyright and License

Copyright 2016-present Box, Inc. All Rights Reserved.

Licensed under the Box Software License Agreement v.20170516. You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://developer.box.com/docs/box-sdk-license

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

box-content-preview-demo's People

Contributors

priyajeet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

box-content-preview-demo's Issues

build error

following the instructions (after running npm install) > modified index.js with my own token > yarn start generated error:

ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: Unexpected token (28:4)

26 |
27 | render(

28 | <ContentPreview
| ^
29 | hasHeader
30 | fileId={FILE_ID_DOC}
31 | token={token}

ℹ 「wdm」: Failed to compile.

403 (Forbidden) error after updating boxId and token

This is the error that I got
Failed to load resource: the server responded with a status of 403 (Forbidden)
I tried with postman and has no issue with the token but I don't know why it does not work on the demo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.