-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to upload a file? #60
Comments
Citing John I might be able to automate your patches. The generator I wrote already does various patches before and after running Swagger to permanently fix some known problems. After you make your modifications, please send me the before and after files. To make this more viable, please:
Citing Wang I didn't really download the ebay_rest library, I just learning it before use it in product, but I could not understand how the upload_file works because I could not find the code it actually open/read the file, again I never wrote a test code to verify if it works or not. For the patch, I suggest this In file https://github.com/matecsaj/ebay_rest/blob/main/src/ebay_rest/api/sell_feed/api/task_api.py#L642 after Line 615 local_var_files = {} append following code local_var_files = {params.get('name'): params.get('file_name')} Again I never downloaded this library so I just feel it should work. |
After a few days of trying this is the code that works:
To make it work you need to add e few lines in sell_feed/api/task_api.py to make upload_file_with_http_info() aware of the 'file' attribute: somewhere after the line 602: and after the line 652:
|
Once again, thank you! I'm intensely working on another project, so please forgive me for letting this be for several weeks. If you need a fresh release with this change sooner or are willing to submit a PR, please use scripts/generate_code.py to patch sell_feed/api/task_api.py and provide a unit test. |
Swagger with OpenAPI contracts from eBay generate the core of this library, and they are not currently able to accept a path-file. Please ask eBay to solve the root problem; many voices will convince them of the need to act.
To learn more search in the Unit Tests for 'sell_feed_upload_file'.
Workarounds are suggested in the ReadMe search for 'How to upload a file?'.
The text was updated successfully, but these errors were encountered: