Javascript tools used by filestack
Api documentations is available on github pages
- file - file manipulation tools like exif removal, mimetypes operations etc
- filterJpeg - filter jpeg file metadata
- extensionToMime - convert extension to mimetype
- getMimetype - returns mimetype based on magicbytes and extension
- isAcceptable - checks if ext or mime is in acceptable array
import { filterJpeg } from 'filestack-tools';
filterJpeg(FILE_BUFFER, options)
import { filterJpeg } from 'filestack-tools';
filterJpeg(BLOB, options)
<script src="//static.filestackapi.com/filestack-tools/{MAJOR_VERSION}.x.x/filestack-tools.min.js" crossorigin="anonymous"></script>
<script>
const filterJpeg = filestackTools.filterJpeg(FILE);
</script>
where {MAJOR_VERSION}
is one of the MAJOR versions of the filestack-js ie:
<script src="//static.filestackapi.com/filestack-tools/3.x.x/filestack-tools.min.js" crossorigin="anonymous"></script>
<script>
const filterJpeg = filestackTools.filterJpeg(FILE);
</script>
Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match
To obtain sri hashes for filestack-tools library check manifest.json file on CDN:
https://static.filestackapi.com/filestack-tools/{LIBRARY_VERSION}/manifest.json
<script src="//static.filestackapi.com/filestack-tools/{LIBRARY_VERSION}/filestack-tools.min.js" integrity="{FILE_HASH}" crossorigin="anonymous"></script>
Where {LIBRARY_VERSION}
is currently used library version and {FILE_HASH}
is one of the hashes from integrity field in manifest.json file
When using with rollup, set resolve plugin with option browser:true
We use SemVer for versioning. For the versions available, see the tags on this repository.
We follow the conventional commits specification to ensure consistent commit messages and changelog formatting.