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
// Using this code, we can retrieve an image from a user's filesystem, resize the image, and then upload the image | |
// to a server using AJAX. Because we use base64 encoding, we can just include the image data as just another string value | |
// in a JSON payload. | |
// So we can use AJAX to send the file to a server, which is convenient. | |
// We have one line of relevant html | |
// get file in the first place => <input type="file" custom-on-change="onAcqImageFileChange" class="form-control"> |
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
/** | |
* After my bro's olx account was hacked and I had no way to log the hacker out even after i gained access back into the account and changed my password | |
* Any user already logged in before the password change still had access as long as he didnt logout. | |
* I reached out to olx but didnt get any response, so wrote a quick snippet to delete all the hackers Scam publication every 2hrs. | |
* atleast until the `logout every user` feature is implemented on the app. | |
*/ | |
const fightThePublishers = () => { | |
const params = { |