0.1.16 • Published 8 months ago

bstorejs-react v0.1.16

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

8 months ago

0.1.13

8 months ago

0.1.15

8 months ago

0.1.16

8 months ago

0.1.10

8 months ago

0.1.11

8 months ago

0.1.8

8 months ago

0.1.9

8 months ago

0.1.7

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

9 months ago

1.0.0

9 months ago