mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
fix: Resolve constant reassignment warning in Google Drive picker filename handling
This commit is contained in:
parent
eae86f04c5
commit
f919f63d33
1 changed files with 3 additions and 2 deletions
|
|
@ -132,8 +132,9 @@ export const createPicker = () => {
|
||||||
exportFormat = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
exportFormat = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
||||||
} else if (mimeType.includes('spreadsheet')) {
|
} else if (mimeType.includes('spreadsheet')) {
|
||||||
exportFormat = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
exportFormat = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
||||||
// Update filename to have .xlsx extension for spreadsheets
|
// Create new filename with .xlsx extension for spreadsheets
|
||||||
fileName = fileName.endsWith('.xlsx') ? fileName : `${fileName}.xlsx`;
|
const modifiedFileName = fileName.endsWith('.xlsx') ? fileName : `${fileName}.xlsx`;
|
||||||
|
fileName = modifiedFileName;
|
||||||
} else if (mimeType.includes('presentation')) {
|
} else if (mimeType.includes('presentation')) {
|
||||||
exportFormat = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
exportFormat = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue