Skip to content
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

SW360 REST-API "Upload attachment to project" does not allow file upload #1616

Closed
yyosioka opened this issue Aug 19, 2022 · 8 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@yyosioka
Copy link

Description

SW360 REST-API "Upload attachment to project" does not allow file upload.
Please let me know if I may have made a mistake in the REST-API arguments.

I would like to know how to specify the following arguments.

file :File path of the attachment
If I want to specify "test.txt" in the current folder, is the following correct?
'file=@./test.txt'
Please let me know if there are any restrictions on files or folders that store attachments.

attachmentContentId:Id of attachment info
What ID should I specify for this?
Do I need to pre-number it somewhere?

Versions

Version:15.1.0

@yyosioka yyosioka added the bug Something isn't working label Aug 19, 2022
@KoukiHama KoukiHama self-assigned this Aug 24, 2022
@tienlee
Copy link
Contributor

tienlee commented Aug 26, 2022

I will fix this issue. Please assign it to me.

@hoangnt2
Copy link
Contributor

Hi @yyosioka, your file path is correct, attachmentContentId is auto generated, you can remove it in request.
I tested and could upload file normally. Can you give me your response message and git commit id you are using.

@KoukiHama KoukiHama added question Further information is requested and removed bug Something isn't working in progress labels Aug 26, 2022
@yyosioka
Copy link
Author

Thank you for your comment attachmentContentId will be removed.
It is not working yet.
I am using a docker environment following these steps.
https://github.com/eclipse/sw360/blob/main/README_DOCKER.md
git commit ID:c4486690 4ac0471 6aaeb 823a0 c7a5d7cad64b64a

response

HTTP1.1 500
X-Content-Type-Options: nosniff
X-XSS-Protection: 1: mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-type: application/json:charaset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 26 Aug 2022 08:57:48 GMT
Connetion: Close

{"timestamp":"2022-08-26T08:57:48.613736Z","status":500,"error":"Internal Server Error","message"null}

@KoukiHama
Copy link
Member

KoukiHama commented Aug 26, 2022

I am using a docker environment following these steps.

OK.
@heliocastro How about your sw360's environment on docker?
Can you Upload attachment to project?

@yyosioka
Copy link
Author

@hoangnt2 I have changed the name of the file to be attached but the same error is returned.

@hoangnt2
Copy link
Contributor

hoangnt2 commented Aug 31, 2022

@yyosioka Can you give me your http request and log file of sw360?

@yyosioka
Copy link
Author

Thank you for your response.
I have updated to sw360-16.0.0-M1 and confirmed that the attachment is stored in the project.
I will close this case.

@yyosioka
Copy link
Author

Close.

rudra-superrr pushed a commit to siemens/sw360 that referenced this issue Dec 5, 2024
feat(UI): adding additional links to sw360 footer.

Closes eclipse-sw360#1616

See merge request sw360/sw360portal!297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants