This repository was archived by the owner on Mar 3, 2026. It is now read-only.
samples: remove name from the submit field#1671
Merged
Merged
Conversation
frankyn
suggested changes
Oct 20, 2021
|
|
||
| // Create an HTML form with the provided policy | ||
| let output = `<form action='${response.url}' method='POST' enctype="multipart/form-data">\n`; | ||
| let output = `<form action="${response.url}" method="POST" enctype="multipart/form-data">\n`; |
Contributor
There was a problem hiding this comment.
To save us from this in the future, could you add an integration test for this sample?
Contributor
Author
There was a problem hiding this comment.
i think there is one, it just wasnt checking the form field
Contributor
There was a problem hiding this comment.
All it does is check the output of the function and not that the resulting form will be successful.
Contributor
Author
There was a problem hiding this comment.
good point. i will address this in a future PR
…pis/nodejs-storage into shaffeeullah/fixPostPolicySample
ddelgrosso1
reviewed
Oct 20, 2021
| output += | ||
| " <input type='submit' value='Upload File' name='submit'/><br />\n"; | ||
| output += ' <input type="file" name="file"/><br />\n'; | ||
| output += ' <input type="submit" value="Upload File"/><br />\n'; |
Contributor
There was a problem hiding this comment.
What issue was the name causing? Also why the quotation style change?
Contributor
Author
There was a problem hiding this comment.
The name was causing:
<Error>
<Code>InvalidPolicyDocument</Code>
<Message>The content of the form does not meet the conditions specified in the policy document.</Message>
<Details>Policy did not reference these fields: submit</Details>
</Error>
Quotation change requested here (internal only): https://b.corp.google.com/issues/160889540
It's also HTML convention.
ddelgrosso1
approved these changes
Oct 20, 2021
…pis/nodejs-storage into shaffeeullah/fixPostPolicySample
frankyn
approved these changes
Oct 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.