« first day (3821 days earlier)      last day (296 days later) » 

09:44
Okay okay. Perhaps I figured, but you can correct me here.
If I am to upload a file to a folder that does not yet exist, the code should look like this
const params = {
Bucket: "ctp-portal-dev",
Key: "users/" + file.name,
Body: file.data,
ACL: "public-read"
};

// Uploading files to the bucket
s3.upload(params, function(err, data) {
if (err) {
console.log(err.message)
throw err;
}
console.log(`File uploaded successfully. ${data.key} ${data.Key} ${data.ETag}`);
console.log(Object.keys(data))
});
1 message moved from JavaScript
 
6 hours later…
16:06
    const arrayRemoveDupes = (r) => {
      if(!Array.isArray(r)){return undefined;}
      let newR = [];
      let isDupe; // idk if putting a let in a for is safe
      for(let i=0;i<r.length;i++) { // for each element
        isDupe = false; // initiate it as being not a dupe
        for(let j=0;j<newR.length;j++) { // for each element of newR
          if(r[i] === newR[j]) { // compare current elem of r with current elem of newR
            isDupe = true; // if it ever is, then mark the current element as dupe
1 message moved from JavaScript
16:24
is it posible to use triple-backtick to make codeblocks?
```
test
```
welp
guess you have to tab it

« first day (3821 days earlier)      last day (296 days later) »