diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/client/common/fileViewer.component.js | 6 | ||||
| -rw-r--r-- | app/relay/system.js | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/client/common/fileViewer.component.js b/app/client/common/fileViewer.component.js index d9f3f4b..d98073b 100644 --- a/app/client/common/fileViewer.component.js +++ b/app/client/common/fileViewer.component.js @@ -36,25 +36,27 @@ class FileViewer extends Component { return } const fn = [path || file.path, file.name].join('/').replace('//','/') - console.log('fetch file', fn) const { tool: module } = this.props.app this.setState({ buffer: null, loading: true }) if (thumbnail) { + console.log('fetch thumbnail', fn) const size = parseInt(thumbnail) || 200 actions.socket .thumbnail({ module, fn, size }) .then(this.loadBuffer.bind(this)) } else { + console.log('fetch file', fn) actions.socket .read_file({ module, fn }) .then(this.loadBuffer.bind(this)) } } loadBuffer(buffer) { - console.log('fetched buffer') + console.log('fetched buffer', buffer) const { stale } = this.state this.setState({ buffer, loading: false, stale: false, }, () => { + console.log('loaded') if (stale) { console.log('stale, fetching...') this.fetch() diff --git a/app/relay/system.js b/app/relay/system.js index 49b8c33..e8feee8 100644 --- a/app/relay/system.js +++ b/app/relay/system.js @@ -110,7 +110,6 @@ export function thumbnail(opt, cb) { .jpeg({ quality: opt.quality || THUMBNAIL_QUALITY }) .toBuffer() .then(buf => cb({ - error: err, name: opt.fn, path: fn, date: stat.ctime, |
