-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): File info API #2496
feat(api): File info API #2496
Conversation
3b817cb
to
aed15eb
Compare
This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing the screenshot attached, would recommend following changes:
view_info
:- can extend the
Hash
model object as it already contains the checksums and file size. - No need of different size calculations, the size in bytes stored in
Hash
can be used to calculate them. - Change
filePfileId
topfileId
.
- can extend the
meta_info
:- Remove
file
from the beginning of keys. - I believe
fileInfo
andscanossInfo
as booleans? Please check if so and translate1 => true
,0 => false
.
- Remove
Try uploading this small deb
file and run the package analysis agent on it to get more info on the page.
At the same time, try running the scanoss
agent on FOSSology or atarashi to get some match info in Info page.
https://ftp.debian.org/debian/pool/main/l/lsb/lsb-release_11.1.0_all.deb
aed15eb
to
bfb3fa0
Compare
Tested, working as expected. |
4ed749a
to
c31c083
Compare
pkgagent does not seem to work correctly now. Let us not bother much about its output as people rarely use it. We can fix it later. |
c31c083
to
a0577c6
Compare
Sure!! |
a0577c6
to
c0c0f18
Compare
c0c0f18
to
13d79e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good.
Description
API endpoint to get info for a file
How to test
Send a get request to
/file/upload/{UploadId}/item/{ItemId}/info
Screenshots
closes #2493
@shaheemazmalmmd @GMishx