-
Notifications
You must be signed in to change notification settings - Fork 7
sdk method for Add file and directory #119
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
Conversation
| """ | ||
| self.action = 'Add file content' | ||
| url_encoded = urlencode({'uri': file_uri}) | ||
| self.path = "{}/file?{}".format(self.api_path, url_encoded) |
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.
I think this API should be deprecated, and we should use a real upload API with multipart content. This method may pose serious problem with bianry content.
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.
This API is used in WF file editor, BPM editor .. since those are from editor, I guess we cannot use mulipart content. probably we can limit the content size, sanitize the input path and other security checks
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.
Probably I guess we should restrict this kind of API to be only allowed to call only from our UI. not directly, just thinking out loud
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.
What I mean, is we are going to propose a add_file api, the idea is to do it correctly. The fact that UI is using this buggy API is another problem.
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.
Note:
I am note sure for UI.
Every people on UI should know that you upload things with multi part, so having a 100% in house way to upload things seems to be more a problem than a solution.
I think UI libraries should as default be compatible with multi part upload.
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.
@Vignaudo I created a ticket to address this in the next release - https://jiras.ubiqube.com/browse/MSA-14797
b767737 to
37892f5
Compare
d4299a1 to
8ea0d38
Compare
No description provided.