doGet Parameters in Apps Script
Apps Script로 Web App을 만들 때 doGet함수의 매개 변수 e는 event object입니다.
Web Apps
https://developers.google.com/apps-script/guides/web
Request Parameters
e.parameter :
An object of key/value pairs that correspond to the request parameters. Only the first value is returned for parameters that have multiple values.
Web Apps
https://developers.google.com/apps-script/guides/web
Request Parameters
e.parameter :
An object of key/value pairs that correspond to the request parameters. Only the first value is returned for parameters that have multiple values.
Query string
Pre-order copy 앱의 doGet 함수에 src parameter를 추가했습니다.
이것은 사용자가 앱의 Source 입력 상자에 문자열을 입력하고 Copy 버튼을 클릭하는 것과 같습니다.
src Parameter 기능을 확인하기 위해서 파일을 복사해 보겠습니다.
![]() |
EOJJI Why and How logo.png |
Google 드라이브에 있는 이 파일의 URL은 다음과 같습니다.
Pre-order copy 앱 실행 URL은 다음과 같습니다.
Pre-order copy 앱 실행 URL 뒤에 ?src=를 적고 EOJJI Why and How logo.png 파일 URL을 덧 붙입니다.
이렇게 만든 문자열을 웹 브라우저 주소 표시줄에 붙여 넣고 이동하면 파일이 구글 드라이브에 복사되고 앱 화면이 표시됩니다.
![]() |
Pre-order Copy src parameter.png |
복사된 파일을 보려면 앱 화면의 Log Spreadsheet를 클릭해서 로그를 참고하세요.
댓글