Skip to Content
한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
book

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

by 한성용, 이선 브라운
April 2016
Beginner to intermediate
389 pages
9h 8m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
202
한 권으로 끝내는 Node & Express
NOTE
_
일반적으로 사용자가 올린 것은 아무것도 믿어선 안 됩니다. 사용자를 믿으면 웹사이트 공격에 문
을 열어주게 됩니다. 예를 들어 악의적인 사용자가 해로운 실행 파일을 만들어 확장자만
.
jpg
로 바꿔 올릴 수
도 있습니다. 나중에 어떻게든 그 파일을 실행할 기회가 생기길 기대하면서 말입니다. 마찬가지로, 브라우저
가 제공한
name
프로퍼티를 그대로 써서 파일 이름을 정하는 것도 조금 위험합니다. 파일 이름에 특수문자
를 써서 악용할 수 있으니까요. 우리는 파일 이름은 무작위로 정하고, 확장자만(영문과 숫자로만 구성된 걸
확인하고) 그대로 써서 이 코드를 완벽히 안전하게 만들겠습니다.
13.2.
클라우드 지속성
클라우드 스토리지는 점점 더 인기를 얻고 있고, 필자 역시 저렴하고 사용하기 쉬운 이 서비스
의 장점을 활용하길 적극 권합니다. 먼저 아마존
S3
계정에 파일을 저장하기가 얼마나 쉬운지
예를 보이겠습니다.
var filename
=
'
customerUpload
.
jpg
';
aws
.
putObject
({
ACL
:
'
private
',
Bucket
:
'
uploads
',
Key
:
filename
,
Body
:
fs
.
readFileSync
(
__
dirname
+
'/
tmp
/
+
filename
)
});
정보가 더
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한선용, 이선 브라운

Publisher Resources

ISBN: 9788968482229