Skip to content

Commit

Permalink
No longer pass “null” in upload requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Jan 23, 2024
1 parent 99b84d7 commit b780ec9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion panel/dist/js/index.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion panel/src/helpers/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default async (file, params) => {

// add all other attributes to form data
for (const attribute in options.attributes) {
data.append(attribute, options.attributes[attribute]);
const value = options.attributes[attribute];

if (value !== null && value !== undefined) {
data.append(attribute, value);
}
}

const progress = (event) => {
Expand Down

0 comments on commit b780ec9

Please sign in to comment.