Fix bugs
This commit is contained in:
parent
6e091261d3
commit
253747ecfb
|
@ -52,15 +52,12 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (type) {
|
if (type) {
|
||||||
query.type = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
query.contentType = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue query
|
// Issue query
|
||||||
const files = await DriveFile
|
const files = await DriveFile
|
||||||
.find(query, {
|
.find(query, {
|
||||||
fields: {
|
|
||||||
data: false
|
|
||||||
},
|
|
||||||
limit: limit,
|
limit: limit,
|
||||||
sort: sort
|
sort: sort
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,6 +49,8 @@ export default (
|
||||||
_target.created_at = _file.uploadDate;
|
_target.created_at = _file.uploadDate;
|
||||||
_target.name = _file.filename;
|
_target.name = _file.filename;
|
||||||
_target.type = _file.contentType;
|
_target.type = _file.contentType;
|
||||||
|
_target.datasize = _file.length;
|
||||||
|
_target.md5 = _file.md5;
|
||||||
|
|
||||||
_target = Object.assign(_target, _file.metadata);
|
_target = Object.assign(_target, _file.metadata);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-hashtag"></i>%i18n:mobile.tags.mk-drive-file-viewer.hash%
|
<i class="fa fa-hashtag"></i>%i18n:mobile.tags.mk-drive-file-viewer.hash%
|
||||||
</p>
|
</p>
|
||||||
<code>{ file.hash }</code>
|
<code>{ file.md5 }</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in New Issue