Take off

블로그 이미지
by 안.들
  • Total hit
  • Today hit
  • Yesterday hit

root@doitforyou.co.kr:/opt/thingplus/openhardware/raspberrypi/camera# ./thingplus_device.sh status

stopped

root@doitforyou.co.kr:/opt/thingplus/openhardware/raspberrypi/camera# ./thingplus_device.sh restart

thingplus device started


root@doitforyou.co.kr:/opt/thingplus/openhardware/raspberrypi/camera# 

TypeError: Cannot call method 'replace' of undefined

    at Request._callback (/opt/thingplus/openhardware/raspberrypi/camera/dropbox-driect-url.js:14:32)

    at Request.self.callback 

===============================


dropbox-driect-url.js

이 js파일은 무슨용도인가?

url로 바로 업로드된 이미지를 볼수 있는 경로를 리턴하는것 같은데.

리턴해서 어디서 이 값을 받아 쓰는가?


에러의 원인은

var redirectUrl = response.headers.location;

location으로 값을 못가져와서 replace 명령이 오류가 발생한 것..

console.log(JSON.stringify(response.headers)); 로 찍으면 아래처럼 나오는데.

최초작성의도였던 "response.headers.location" 이 값을 가져오려면 어떤 명령어를 쓰면 될까? 


-------------------------------------- 

header:{"server":"nginx","date":"Sat, 04 Mar 2017 13:01:56 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","cache-control":"no-cache","content-security-policy":"script-src 'unsafe-eval' https://www.dropbox.com/static/compiled/js/ https://www.dropbox.com/static/javascript/ https://www.dropbox.com/static/api/ https://cfl.dropboxstatic.com/static/compiled/js/ https://www.dropboxstatic.com/static/compiled/js/ https://cfl.dropboxstatic.com/static/javascript/ https://www.dropboxstatic.com/static/javascript/ https://cfl.dropboxstatic.com/static/api/ https://www.dropboxstatic.com/static/api/ https://www.google.com/recaptcha/api/ 'unsafe-inline' 'nonce-11LVKubJAI8Zmn0pJmmW' ; default-src 'none' ; worker-src blob: ; style-src https://* 'unsafe-inline' 'unsafe-eval' ; connect-src https://* ws://127.0.0.1:*/ws ; child-src https://www.dropbox.com/static/serviceworker/ blob: ; form-action 'self' https://dl-web.dropbox.com/ https://photos.dropbox.com/ https://accounts.google.com/ https://api.login.yahoo.com/ https://login.yahoo.com/ ; base-uri 'self' api-stream.dropbox.com https://showbox-tr.dropbox.com ; report-uri https://www.dropbox.com/log/csp_enforced ; img-src https://* data: blob: ; frame-ancestors 'self' ; frame-src https://* carousel://* dbapi-6://* dbapi-7://* dbapi-8://* itms-apps://* itms-appss://* ; object-src https://cfl.dropboxstatic.com/static/ https://www.dropboxstatic.com/static/ 'self' https://flash.dropboxstatic.com https://swf.dropboxstatic.com https://dbxlocal.dropboxstatic.com ; media-src https://* blob: ; font-src https://* data:","dropbox-streaming":"V=1","pragma":"no-cache","set-cookie":["locale=en; Domain=dropbox.com; expires=Thu, 03 Mar 2022 13:01:56 GMT; Path=/; secure","gvc=MTkxOTI2ODEyODcxNjQ4NzQ1NzM2NzkwNDM4MzY1OTgxODcwOTMz; expires=Thu, 03 Mar 2022 13:01:56 GMT; httponly; Path=/; secure","puc=; expires=Sat, 04 Mar 2017 13:01:56 GMT; httponly; Path=/; secure","seen-sl-signup-modal=VHJ1ZQ%3D%3D; expires=Mon, 03 Apr 2017 13:01:56 GMT; httponly; Path=/; secure","t=CeKHNZPQqaFb8CNrhjGdR-1G; Domain=dropbox.com; expires=Tue, 03 Mar 2020 13:01:56 GMT; httponly; Path=/; secure","__Host-js_csrf=CeKHNZPQqaFb8CNrhjGdR-1G; expires=Tue, 03 Mar 2020 13:01:56 GMT; Path=/; secure"],"x-content-type-options":"nosniff","x-dropbox-http-protocol":"None","x-dropbox-request-id":"1092b42b3f65a203ce9ed233bb62d77a","x-frame-options":"DENY","x-robots-tag":"noindex, nofollow, noimageindex","x-xss-protection":"1; mode=block","strict-transport-security":"max-age=15552000; includeSubDomains"}


result  ==> thingplus로부터  .js 파일받아 진행. update 안된 버전으로 테스트되어 에러 발생했음.

AND

ARTICLE CATEGORY

분류 전체보기 (66)
금융 (0)
관제 (4)
Unix (1)
Android (6)
Windows (2)
Java (4)
oracle (3)
web (3)
English (3)
Physics (1)
Books (6)
요리 (1)
Deep Learning (6)
IoT (21)
to-do list (0)
Music (1)

RECENT ARTICLE

RECENT COMMENT

CALENDAR

«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

ARCHIVE