mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
fix auth screens' missing config permission, and media URL resolution
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"bin": "./dist/cli/index.js",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.1",
|
||||
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
||||
"homepage": "https://bknd.io",
|
||||
"repository": {
|
||||
|
||||
@@ -57,7 +57,7 @@ export function BkndProvider({
|
||||
errorShown.current = true;
|
||||
|
||||
setError(true);
|
||||
return;
|
||||
//return;
|
||||
} else if (error) {
|
||||
setError(false);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ export function BkndProvider({
|
||||
value={{ ...schema, actions, requireSecrets, app, adminOverride, hasSecrets }}
|
||||
key={local_version}
|
||||
>
|
||||
{error && (
|
||||
{/*{error && (
|
||||
<Alert.Exception className="gap-2">
|
||||
<IconAlertHexagon />
|
||||
You attempted to load system configuration with secrets without having proper
|
||||
@@ -115,7 +115,7 @@ export function BkndProvider({
|
||||
<Button variant="red">Reload</Button>
|
||||
</a>
|
||||
</Alert.Exception>
|
||||
)}
|
||||
)}*/}
|
||||
|
||||
{children}
|
||||
</BkndContext.Provider>
|
||||
|
||||
@@ -219,19 +219,20 @@ export function Dropzone({
|
||||
return;
|
||||
}
|
||||
|
||||
const { url, headers, method = "POST" } = getUploadInfo(file.body);
|
||||
const uploadInfo = getUploadInfo(file.body);
|
||||
console.log("dropzone:uploadInfo", uploadInfo);
|
||||
const { url, headers, method = "POST" } = uploadInfo;
|
||||
const formData = new FormData();
|
||||
formData.append("file", file.body);
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
const urlWithParams = new URL(url);
|
||||
console.log("xhr:url", url);
|
||||
const searchParams = new URLSearchParams();
|
||||
if (overwrite) {
|
||||
urlWithParams.searchParams.append("overwrite", "1");
|
||||
searchParams.append("overwrite", "1");
|
||||
}
|
||||
console.log("url", urlWithParams.toString());
|
||||
//return;
|
||||
|
||||
xhr.open(method, urlWithParams.toString(), true);
|
||||
xhr.open(method, String(url) + "?" + String(searchParams), true);
|
||||
|
||||
if (headers) {
|
||||
headers.forEach((value, key) => {
|
||||
|
||||
@@ -29,10 +29,11 @@ export function DropzoneContainer({
|
||||
...props
|
||||
}: DropzoneContainerProps) {
|
||||
const id = useId();
|
||||
const baseUrl = useBaseUrl();
|
||||
const api = useApi();
|
||||
const baseUrl = api.baseUrl;
|
||||
const invalidate = useInvalidate();
|
||||
const limit = query?.limit ? query?.limit : props.maxItems ? props.maxItems : 50;
|
||||
console.log("dropzone:baseUrl", baseUrl);
|
||||
|
||||
const $q = useEntityQuery(
|
||||
entity_name as "media",
|
||||
|
||||
Reference in New Issue
Block a user