Skip to content

Commit

Permalink
bugfix: file upload tag_set ternary was reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
skeptrunedev authored and cdxker committed Dec 18, 2024
1 parent a82b949 commit 069b273
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontends/search/src/components/UploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const UploadFile = () => {
{
link: link() === "" ? undefined : link(),
tag_set:
tagSet().split(",").length > 0 ? undefined : tagSet().split(","),
tagSet().split(",").length > 0 ? tagSet().split(",") : undefined,
split_delimiters: splitDelimiters(),
target_splits_per_chunk: targetSplitsPerChunk(),
rebalance_chunks: rebalanceChunks(),
Expand All @@ -168,9 +168,9 @@ export const UploadFile = () => {
let base64File = await toBase64(file);
base64File = base64File
.split(",")[1]
.replace(/\+/g, "-") // Convert '+' to '-'
.replace(/\//g, "_") // Convert '/' to '_'
.replace(/=+$/, ""); // Remove ending '='
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "");
const requestBody: RequestBody = {
...requestBodyTemplate,
base64_file: base64File,
Expand Down

0 comments on commit 069b273

Please sign in to comment.