Skip to content

Commit

Permalink
Changed file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
GuidoZam committed Aug 18, 2023
1 parent fc48461 commit ad27c5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controls/dynamicForm/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export class DynamicForm extends React.Component<
) // Replace not allowed chars in folder name
: ""; // Empty string will be replaced by SPO with Folder Item ID

const fileCreatedResult = await library.rootFolder.files.add(itemTitle, selectedFile.downloadFileContent(), true);
const fileCreatedResult = await library.rootFolder.files.addChunked(encodeURI(itemTitle), await selectedFile.downloadFileContent());
const fields = await fileCreatedResult.file.listItemAllFields();

if (fields[idField]) {
Expand Down

0 comments on commit ad27c5c

Please sign in to comment.