Download the PHP package fluxsave/sdk without Composer
On this page you can find all versions of the php package fluxsave/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description VaultSens SDK for API key uploads and file management
License MIT
Informations about the package sdk
vaultsens/sdk
PHP SDK for VaultSens. API key + secret authentication with file upload, folder management, and image transform helpers.
Install
Quick start
API reference
new VaultSensClient(baseUrl, apiKey, apiSecret)
| Parameter | Type | Description |
|---|---|---|
$baseUrl |
string |
Your VaultSens API base URL |
$apiKey |
string\|null |
API key |
$apiSecret |
string\|null |
API secret |
Use setAuth($apiKey, $apiSecret) to set credentials after construction.
Files
uploadFile($filePath, $name = null, $compression = null, $folderId = null, $filename = null, $mimeType = null)
Upload a single file.
Parameters
| Parameter | Type | Description |
|---|---|---|
$filePath |
string |
Path to the file on disk |
$name |
string\|null |
Display name stored with the file |
$compression |
string\|null |
Server-side compression: 'none' | 'low' | 'medium' | 'high'. Must be allowed by your plan |
$folderId |
string\|null |
ID of the folder to place the file in. Omit for root |
$filename |
string\|null |
Multipart filename to send. Defaults to basename($filePath) |
$mimeType |
string\|null |
Explicit MIME type. If omitted, the SDK detects from the file or falls back to the filename extension |
uploadFiles(array $filePaths, $name = null, $compression = null, $folderId = null, $filenames = null, $mimeTypes = null)
Upload multiple files in one request. Accepts the same parameters as uploadFile.
listFiles($folderId = null)
List all files. Pass $folderId to filter by folder, or "root" for files not in any folder.
getFileMetadata($fileId)
updateFile($fileId, $filePath, $name = null, $compression = null, $filename = null, $mimeType = null)
Replace a file's content. Accepts $name and $compression — $folderId is not supported (file stays in its current folder).
deleteFile($fileId)
buildFileUrl($fileId, array $options = [])
Build a URL for dynamic image transforms. No network request is made.
Transform options
| Key | Type | Description |
|---|---|---|
width |
int? |
Output width in pixels |
height |
int? |
Output height in pixels (fit: inside, aspect ratio preserved) |
format |
string? |
Output format e.g. 'webp', 'jpeg', 'png' |
quality |
int? |
Compression quality 1–100 |
Folders
listFolders()
createFolder($name, $parentId = null)
renameFolder($folderId, $name)
deleteFolder($folderId)
Deletes the folder and moves all its files back to root.
Metrics
Error handling
All API errors throw a VaultSensError with an $errorCode, HTTP status code, and message.
Error codes
| Constant | Status | Description |
|---|---|---|
FILE_TOO_LARGE |
413 | File exceeds plan's maxFileSizeBytes |
STORAGE_LIMIT |
413 | Total storage quota exceeded |
FILE_COUNT_LIMIT |
403 | Plan's maxFilesCount reached |
MIME_TYPE_NOT_ALLOWED |
415 | File type blocked by plan |
COMPRESSION_NOT_ALLOWED |
403 | Compression level not permitted by plan |
SUBSCRIPTION_INACTIVE |
402 | User subscription is not active |
FOLDER_COUNT_LIMIT |
403 | Plan's maxFoldersCount reached |
EMAIL_ALREADY_REGISTERED |
400 | Duplicate email on register |
EMAIL_NOT_VERIFIED |
403 | Login attempted before verifying email |
INVALID_CREDENTIALS |
400 | Wrong email or password |
INVALID_OTP |
400 | Bad or expired verification code |
UNAUTHORIZED |
401 | Missing or invalid credentials |
NOT_FOUND |
404 | Resource not found |
UNKNOWN |
— | Any other error |
License
MIT