Skip to content

Commit

Permalink
Merged in bugfix/LIS-869--file-not-found-pop-up-when-customer-tries-t…
Browse files Browse the repository at this point in the history
…o-ope (pull request parse-community#7)

LIS-869 removed params from file name
  • Loading branch information
steve-stencil authored and cmozingoleap committed Oct 4, 2022
2 parents 49e6edc + c2707c7 commit 4d036a7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Controllers/FilesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ export class FilesController extends AdaptableController {
}

createFile(config, filename, data, contentType, options) {
const [name, params] = filename.split('?');
const extname = path.extname(name);
const extname = path.extname(filename);

const hasExtension = extname.length > 0;

if (!hasExtension && contentType && mime.getExtension(contentType)) {
filename = `${name}.${mime.getExtension(contentType)}?${params}`;
filename = `${filename}.${mime.getExtension(contentType)}`;
} else if (hasExtension && !contentType) {
contentType = mime.getType(filename);
}
Expand Down

0 comments on commit 4d036a7

Please sign in to comment.