dptsi/blob-repository

There is no license information available for the latest version (v1.0.0) of this package.

Upload Blob to repository ITS.

v1.0.0 2024-09-26 01:01 UTC

This package is auto-updated.

Last update: 2025-01-26 01:36:27 UTC


README

Repository ini berisi library PHP yang digunakan untuk mengunggah file ke storage API ITS

Requirements

  1. PHP 5.4 ++
  2. guzzle

example is in test-upload.php

Instalation

add composer.json
    "dptsi/blob-repository": "dev-master"

after require section add this
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/dptsi/blob-repository.git"
        }
    ]

Usage

Instalation
<?php
require './vendor/autoload.php';
$blobUpload = new BlobRepository('SSO Provider', 'SSO Client ID', 'SSO Secret', 'Alamat Storage API (Kosong jika prod)');

Get File 
$file  = $blobUpload->getFile($file_id);


Store File 
$file Upload = $blobUpload->storeFile($_FILES['fileToUpload']);

Delete File 
$file Upload = $blobUpload->deleteFile($file_id);

Update File 
$file Upload = $blobUpload->updateFile($_FILES['fileToUpload'], $file_id);

Methods

file_id()
file_name()
tag()
timestamp()
public_link()

To get responses from server access $file->response