0.1.16 • Published 10 months ago

bstorejs-react v0.1.16

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

bstore NPM Package React Package Demo

Install

npm i bstorejs-react

Import

import { Put, Get, Del } from 'bstorejs-react'; //Functions
import { BstoreImage, BstoreVideo, BstoreApplication } from 'bstorejs-react'; // Component

Functions

// Upload a File
const res = await Put(file.name, file, 'public');

// Download a File
const res = await Get(file.name, 'public');

// Delete a File
const res = await Del(file.name, 'public');

Components

  1. Image
return ( 
    <BstoreImage 
        path={"http://localhost:8080/bstore/images/image.png"}
        alt="Uploaded file"
        className="max-w-full max-h-full object-contain" 
    />
)
  1. Video
return ( 
    <BstoreVideo
        path={"http://localhost:8080/bstore/videos/video.mp4"}
        controls={true}
        className="max-w-full max-h-full"
    />
)
  1. Application
return ( 
    <BstoreApplication
        path={"http://localhost:8080/bstore/books/book.pdf"}
        type={file?.type || ''}
        className="max-w-full max-h-full"
    />
)
0.1.12

10 months ago

0.1.13

10 months ago

0.1.15

10 months ago

0.1.16

10 months ago

0.1.10

10 months ago

0.1.11

10 months ago

0.1.8

10 months ago

0.1.9

10 months ago

0.1.7

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

1.0.0

10 months ago