Skip to content

Commit bf0f3c7

Browse files
code clean-up
1 parent 2bab115 commit bf0f3c7

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,4 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
242242

243243
## Contributing
244244

245-
We follow the [conventional commits](https://conventionalcommits.org/) specification to ensure consistent commit messages and changelog formatting..
245+
We follow the [conventional commits](https://conventionalcommits.org/) specification to ensure consistent commit messages and changelog formatting.

src/lib/api/upload/file_tools.browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import { File as FsFile } from './file';
1818
import { SanitizeOptions, getMimetype } from './../../utils';
1919
import { FilestackError } from './../../../filestack_error';
20-
// import fileType from 'file-type';
2120

2221
export type RawFile = Blob | Buffer | File | string;
2322
export type NamedInputFile = {

src/lib/utils/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,7 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
106106
try {
107107
type = await fromBuffer(file);
108108
} catch(e) {
109-
// const mime = extensionToMime(name);
110-
// if (mime) {
111-
// return mime;
112-
// }
113-
console.log("catching")
109+
console.warn("An exception occurred while processing the buffer:", e.message);
114110
}
115111
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];
116112

@@ -142,7 +138,6 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
142138
return type.mime;
143139
}
144140

145-
// return 'application/octet-stream';
146141
};
147142

148143
/**

0 commit comments

Comments
 (0)