Skip to content

Commit

Permalink
code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-singh-filestack committed Jan 5, 2024
1 parent 2bab115 commit bf0f3c7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,

## Contributing

We follow the [conventional commits](https://conventionalcommits.org/) specification to ensure consistent commit messages and changelog formatting..
We follow the [conventional commits](https://conventionalcommits.org/) specification to ensure consistent commit messages and changelog formatting.
1 change: 0 additions & 1 deletion src/lib/api/upload/file_tools.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import { File as FsFile } from './file';
import { SanitizeOptions, getMimetype } from './../../utils';
import { FilestackError } from './../../../filestack_error';
// import fileType from 'file-type';

export type RawFile = Blob | Buffer | File | string;
export type NamedInputFile = {
Expand Down
7 changes: 1 addition & 6 deletions src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ export const getMimetype = async(file: Uint8Array | Buffer, name?: string): Prom
try {
type = await fromBuffer(file);
} catch(e) {
// const mime = extensionToMime(name);
// if (mime) {
// return mime;
// }
console.log("catching")
console.warn("An exception occurred while processing the buffer:", e.message);
}
const excludedMimetypes = ['text/plain', 'application/octet-stream', 'application/x-ms', 'application/x-msi', 'application/zip'];

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

// return 'application/octet-stream';
};

/**
Expand Down

0 comments on commit bf0f3c7

Please sign in to comment.