-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Files Plugin #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Files Plugin #115
Changes from all commits
6f76009
ce82860
be66fdd
b27e231
ece130a
5d85548
5b0a682
a1c05c4
91367c2
da0e62f
09f86c3
79bd173
f4826dc
60b1bcd
5200066
a0dda75
b95711f
1c5805b
e5e973d
bb57226
07b6671
e065cdc
34ef4a5
a99997f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import "reflect-metadata"; | ||
| import { analytics, createApp, server } from "@databricks/appkit"; | ||
| import { analytics, createApp, files, server } from "@databricks/appkit"; | ||
| import { WorkspaceClient } from "@databricks/sdk-experimental"; | ||
| import { lakebaseExamples } from "./lakebase-examples-plugin"; | ||
| import { reconnect } from "./reconnect-plugin"; | ||
|
|
@@ -22,6 +22,7 @@ createApp({ | |
| telemetryExamples(), | ||
| analytics({}), | ||
| lakebaseExamples(), | ||
| files({ defaultVolume: process.env.DATABRICKS_DEFAULT_VOLUME }), | ||
atilafassina marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to pass the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how to we manage permissions. Can all users read and upload all the files?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each plugin should work by default by just calling it with no config (meaning we should put a default inside) so we can just call it like |
||
| ], | ||
| ...(process.env.APPKIT_E2E_TEST && { client: createMockClient() }), | ||
| }).then((appkit) => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Function: contentTypeFromPath() | ||
|
|
||
| ```ts | ||
| function contentTypeFromPath( | ||
| filePath: string, | ||
| reported?: string, | ||
| customTypes?: Record<string, string>): string; | ||
| ``` | ||
|
|
||
| Resolve the MIME content type for a file path. | ||
|
|
||
| ## Parameters | ||
|
|
||
| | Parameter | Type | Description | | ||
| | ------ | ------ | ------ | | ||
| | `filePath` | `string` | Path to the file (only the extension is inspected). | | ||
| | `reported?` | `string` | Optional MIME type reported by the caller; used as fallback when the extension is unknown. | | ||
| | `customTypes?` | `Record`\<`string`, `string`\> | Optional map of extension → MIME type overrides (e.g. `{ ".csv": "text/csv" }`). | | ||
|
|
||
| ## Returns | ||
|
|
||
| `string` | ||
|
|
||
| The resolved MIME content type string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reverted types look like a regression