Kiwi
Kiwi copied to clipboard
tcms.rpc.api.user.add_attachment return URL that doesn't work
Using
tcms.rpc.api.user.add_attachment(filename, b64content, **kwargs)[source] RPC User.add_attachment(filename, b64content)
returns URL and file name. But when try to open the URL it's displaying 404 page not found
Used (https://public.tenant.kiwitcms.org/)
Steps to Reproduce
- Try to upload an PNG image using user.add_attachment
- Getting response in proper dictionary with URL and file name.
- Now try to open the URL in browser when logged in with same user.
Actual results
Dictionary results are: url is :/uploads/attachments/auth_user/15355/TestCheckAttgu.png file is LTestCheckAttgu.png
Expected results
404 not found should not be shown
Additional info (Python traceback, logs, etc.)
Steps to Reproduce
1. Try to upload an PNG image using user.add_attachment 2. Getting response in proper dictionary with URL and file name. 3. Now try to open the URL in browser when logged in with same user.
I tried but couldn't reproduce. The file was still accessible afterwards.
Can you post the exact version of the tcms-api package you are using and more detailed steps to reproduce.
Actual results
Dictionary results are: url is :/uploads/attachments/auth_user/15355/TestCheckAttgu.png file is LTestCheckAttgu.png
This isn't a dictionary and your filename LTestCheckAttgu.png
doesn't math the resulting URL. Can you post the actual dictionary returned from the Python library to avoid any mismatches or typos ?