
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@tapstack/storage
Advanced tools
Tapstack Storage Client - Official SDK for file storage, uploads, and image optimization
Official Tapstack Storage SDK for file uploads, downloads, image optimization, and folder management.
npm install @tapstack/storage
import { TapstackStorage } from '@tapstack/storage';
const storage = new TapstackStorage({
apiUrl: 'https://api.tapstack.com',
apiKey: 'ts_...',
});
// Upload a file
const file = await storage.upload(buffer, { name: 'photo.jpg' });
// Get public URL
const url = await storage.getPublicUrl(file.id);
import { TapstackStorage, TapstackStorageProvider, useUpload, useFiles } from '@tapstack/storage';
const storage = new TapstackStorage({
apiUrl: 'https://api.tapstack.com',
getToken: () => authClient.getToken(),
});
function App() {
return (
<TapstackStorageProvider storage={storage}>
<FileUploader />
</TapstackStorageProvider>
);
}
function FileUploader() {
const { upload, isUploading, progress } = useUpload();
const { data } = useFiles({ mimeType: 'image/*' });
const handleUpload = async (e) => {
const file = e.target.files[0];
await upload(file, { tags: ['avatar'] });
};
return (
<div>
<input type="file" onChange={handleUpload} disabled={isUploading} />
{isUploading && <p>Uploading: {progress?.percent}%</p>}
{data?.files.map(f => <img key={f.id} src={f.publicUrl} alt={f.name} />)}
</div>
);
}
TapstackStoragenew TapstackStorage(config: TapstackStorageConfig)
| Option | Type | Description |
|---|---|---|
apiUrl | string | Base URL of the Tapstack API (required) |
apiKey | string | API key for server-side calls |
getToken | () => string | Promise<string> | Dynamic token getter for frontend apps |
userToken | string | Static user token |
workspaceId | string | Workspace ID to scope requests |
placeholderUrl | string | Default placeholder image URL |
fetch | typeof fetch | Custom fetch (for SSR/tests) |
| Method | Returns | Description |
|---|---|---|
upload(file, options?) | Promise<StorageFile> | Upload a file |
get(fileId) | Promise<StorageFile> | Get file metadata |
list(options?) | Promise<ListFilesResponse> | List files with filtering |
delete(fileId) | Promise<void> | Delete a file |
getPublicUrl(fileId) | Promise<string> | Get public URL |
getSignedUrl(fileId, options?) | Promise<string> | Get signed download URL |
move(fileId, folderId) | Promise<StorageFile> | Move file to folder |
rename(fileId, newName) | Promise<StorageFile> | Rename a file |
copy(fileId, options?) | Promise<StorageFile> | Copy a file |
search(query, options?) | Promise<ListFilesResponse> | Search files |
addTags(fileId, tags) | Promise<StorageFile> | Add tags |
removeTags(fileId, tags) | Promise<StorageFile> | Remove tags |
getUsage() | Promise<StorageUsage> | Get storage usage/quota |
| Method | Returns | Description |
|---|---|---|
listFolders(parentId?) | Promise<StorageFolder[]> | List folders |
getFolder(folderId) | Promise<StorageFolder> | Get folder |
createFolder(name, options?) | Promise<StorageFolder> | Create folder |
renameFolder(folderId, name) | Promise<StorageFolder> | Rename folder |
moveFolder(folderId, parentId) | Promise<StorageFolder> | Move folder |
deleteFolder(folderId) | Promise<void> | Delete folder |
| Method | Returns | Description |
|---|---|---|
optimizeImage(file, options?) | Promise<OptimizedImage> | Generate optimized image variants |
| Hook | Returns | Description |
|---|---|---|
useUpload(defaults?) | { upload, isUploading, progress, error, data, reset } | File upload with progress |
useFile(fileId) | { data, isLoading, error, refetch } | Fetch file metadata |
useFiles(options?) | { data, isLoading, error, refetch } | Fetch file list |
useFileUrl(fileId, options?) | { url, isLoading, error } | Get file URL |
useImageOptimize() | { optimize, isOptimizing, result, error } | Image optimization |
useFolders(parentId?) | { data, isLoading, error, refetch } | Fetch folder list |
| Function | Description |
|---|---|
buildSrcSet(variants) | Build an HTML srcSet string from image variants |
generateUniqueFileName(name) | Generate a unique file name with UUID |
@tapstack/dbThe FileModule in @tapstack/db is deprecated. Replace:
- import { createClient } from '@tapstack/db';
- const client = createClient({ ... });
- await client.files.upload(file);
+ import { TapstackStorage } from '@tapstack/storage';
+ const storage = new TapstackStorage({ apiUrl: '...', apiKey: '...' });
+ await storage.upload(file);
MIT
FAQs
Tapstack Storage Client - Official SDK for file storage, uploads, and image optimization
The npm package @tapstack/storage receives a total of 2 weekly downloads. As such, @tapstack/storage popularity was classified as not popular.
We found that @tapstack/storage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.