I am day 1 fresh using javascript and html. I am simply trying to extract text once a button is clicked and write out that text to an s3 bucket. I have an html file that contains the html and java script function that will extract the text. Now I just need to write that data to s3.
<html>
<body>
<center>
<label for="freeform">Please decribe what you would like photo-ai to create:</label>
<br>
<textarea id="freeform" name="freeform" rows="4" cols="50">
Enter text here...
</textarea>
<input type="button" value="Submit my Application!" onclick="formdata()" />
</center>
</body>
</html>
<script>
function formdata()
{
var free_text= document.getElementById("freeform").value;
}
</script>
I see stuff in Node.js but I am not sure the way I am doing here is possible. Basically I am lost and I am asking for guidance, thanks.
CodePudding user response:
On day one you should definitely learn something else than using AWS S3 SDK to upload objects to S3 bucket, but here are the official SDK with some examples how to make it work:
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-examples.html