MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / addFile

Function addFile

src/app/decrypt/Decrypt.js:173–179  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

171 }
172
173 addFile(file) {
174 if (fileLib.isOversize(file)) {
175 throw new Error(l10n.map.encrypt_upload_file_warning_too_big);
176 }
177 this.fileUpload.readFile(file)
178 .then(file => this.setState(prevState => ({files: [...prevState.files, file]})));
179 }
180
181 handleRemoveFile(id) {
182 this.setState(prevState => ({files: prevState.files.filter(file => file.id !== id)}));

Callers

nothing calls this directly

Calls 2

readFileMethod · 0.80
setStateMethod · 0.45

Tested by

no test coverage detected