fetch(getOurInfo.file_url)
.then(res => res.blob()).then((blob) => {
const a = document.createElement('a');
const url = window.URL.createObjectURL(blob);
a.href = url;
a.download = getOurInfo.file_name || 'Sumaten-introduction.pdf';
a.click();
window.open(url, '_blank');
https://stackblitz.com/edit/listen-to-page-refresh-and-window-close-on-react-router?file=index.js
https://stackoverflow.com/questions/49363412/listen-to-page-refresh-and-window-close-on-react-router
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { withRouter, Prompt } from 'react-router';
var router = require('express').Router()
const multer = require('multer');
const fs = require("fs");
var path = require('path');
const uuidv4 = require('uuid/v4');
const rootPath = require('../server')
const upload = require('./multerConfig');
const AWS = require('aws-sdk');
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
objNode.style.width = "100vw"; | |
objNode.style.height = "100vh"; |
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
############################################################################### | |
# SECTION:Initial Settings | |
############################################################################### | |
# ConfigServer Firewall & Security Configuration File | |
# | |
# Copyright 2006-2013, Way to the Web Limited | |
# URL: http://www.configserver.com | |
# Email: [email protected] | |
############################################################################### |
dung pm2 start index.js
upstream servernode{
ip_hash;
server 127.0.0.1:3000;
}
server {
server_name downloadblog.net;
client_max_body_size 100M;
alignContent: ""
alignItems: ""
alignSelf: ""
alignmentBaseline: ""
all: ""
animation: ""
animationDelay: ""
animationDirection: ""
animationDuration: ""
sudo find /Users/cee/Desktop -name "node_modules" -exec rm -rf '{}' +
'use strict'
const Fs = require('fs')
const Path = require('path')
const Axios = require('axios')
async function downloadImage () {
const url = 'https://unsplash.com/photos/AaEQmoufHLk/download?force=true'
const path = Path.resolve(__dirname, 'images', 'code.jpg')
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
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |