@blinkdotnew/sdk 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ const { text } = await blink.ai.generateText({
|
|
|
45
45
|
prompt: "Write a summary of the user's todos"
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
// Storage operations (instant)
|
|
48
|
+
// Storage operations (instant - returns public URL directly)
|
|
49
49
|
const { publicUrl } = await blink.storage.upload(
|
|
50
50
|
file,
|
|
51
51
|
`avatars/${user.id}.png`,
|
|
@@ -244,7 +244,7 @@ await blink.ai.streamText(
|
|
|
244
244
|
### Storage Operations
|
|
245
245
|
|
|
246
246
|
```typescript
|
|
247
|
-
// Upload files
|
|
247
|
+
// Upload files (returns public URL directly)
|
|
248
248
|
const { publicUrl } = await blink.storage.upload(
|
|
249
249
|
file,
|
|
250
250
|
'path/to/file.jpg',
|
|
@@ -254,18 +254,8 @@ const { publicUrl } = await blink.storage.upload(
|
|
|
254
254
|
}
|
|
255
255
|
)
|
|
256
256
|
|
|
257
|
-
// List files
|
|
258
|
-
const files = await blink.storage.list('folder/')
|
|
259
|
-
|
|
260
|
-
// Get public URL
|
|
261
|
-
const url = await blink.storage.getPublicUrl('path/to/file.jpg')
|
|
262
|
-
|
|
263
257
|
// Remove files
|
|
264
258
|
await blink.storage.remove('file1.jpg', 'file2.jpg')
|
|
265
|
-
|
|
266
|
-
// Copy/move files
|
|
267
|
-
await blink.storage.copy('source.jpg', 'destination.jpg')
|
|
268
|
-
await blink.storage.move('old-path.jpg', 'new-path.jpg')
|
|
269
259
|
```
|
|
270
260
|
|
|
271
261
|
## 🔧 Advanced Usage
|