반응형
반응형

[javascript] DropzoneJS - drag'n'drop file uploads with image previews library

 

http://www.dropzonejs.com/

 

Github : https://github.com/enyo/dropzone

 

Dropzone.js 

Installation

Download the standalone dropzone.js and include it like this:

<script src="./path/to/dropzone.js"></script>

Dropzone is now activated and available as window.Dropzone.

Dropzone does not handle your file uploads on the server. You have to implement the code to receive and store the file yourself.

With component

If you use component you can just add dropzone as a dependency:

"enyo/dropzone": "*"

Then include it like this:

var Dropzone = require("dropzone");

so it is activated and scans the document.

The basic CSS markup is also included with component, but if you want it to look the same as on this page, you have to download the CSS (see below).

With RequireJS

Dropzone is also available as an AMD module for RequireJS.

You can find the dropzone-amd-module in the downloads folder.


This is all you need to get dropzone up and running. But if you want it to look as cool as my dropzone, you’ll need to download the css/dropzone.css, images/spritemap.png and images/spritemap@2x.png as well from the downloads folder.

If you change the folder names make sure you adjust the paths in the css.

The @2x.png spritemap is to support high density (retina) displays.

Usage

The typical way of using dropzone is by creating a form element with the class dropzone:

<form action="/file-upload"
      class="dropzone"
      id="my-awesome-dropzone"></form>

That’s it. Dropzone will find all form elements with the class dropzone, automatically attach itself to it, and upload files dropped into it to the specified action attribute. The uploaded files can be handled just as if there would have been a html input like this:

<input type="file" name="file" />

If you want another name than file you can configure dropzone with the option paramName.

If you’re using component don’t forget to require("dropzone"); otherwise it won’t be activated.

If you want your file uploads to work even without JavaScript, you can include an element with the class fallback that dropzone will remove if the browser is supported. If the browser isn’t supported, Dropzone will not create fallback elements if there is a fallback element already provided. (Obviously, if the browser doesn’t support JavaScript, the form will stay as is)

Typically this will look like this:

<form action="/file-upload" class="dropzone">
  <div class="fallback">
    <input name="file" type="file" multiple />
  </div>
</form>
반응형
반응형

[kakao] 카카오 개발자 사이트

 

https://developers.kakao.com/

 

 

 

 

 

반응형
반응형
 
건물 주인이 깨진 유리창을 그대로 방치하면
이 건물이 무법천지로 변한다.
곧 깨진 유리창처럼 사소한 것들은
사실은 치명적인 위험을 초래한다.
- 마이클 레빈, ‘깨진 유리창의 법칙’에서

 

 

모든 일은 아주 작고 사소한 것에서 비롯됩니다.
큰 사건, 사고 앞에는 반드시
이상 징후들이 나타나게 되어있습니다.
깨진 유리창을 방치하면 큰 재앙을 불러오게 됩니다.
작은 실패라도 숨기지 않고 적극적으로 공개하고
근본 원인을 고쳐나가는 제도와 문화가 필요합니다.

 

반응형
반응형

지리적으로 가까이 살거나
같은 학교, 사무실, 식당에 다니기 때문에
자주 마주치는 사람들과 친구가 된다는 '근접성 이론'에
따르면 근접성은 친숙함, 긍정성과 연관이 있다.
누군가를 처음 만났는데 이미 좋아하는
다른 사람을 떠올리게 된 적이 있는가.
긍정적인 연상 작용은 그 사람과
가까워지고 싶은 생각이 들도록
마음의 준비를 시켜준다.


- 칼린 플로라의《깊이 있는 관계는 어떻게 만들어지는가》중에서 -


* 자주 만나면 가까워지고
안 만나면 멀어지고 잊혀집니다.
가까이 있는 사람끼리 사랑도 하고 미워도 합니다.
'미운정 고운정'은 가까이 있는 사람, 자주 마주치는
사람 사이에 주어지는 특별한 선물입니다.
가까이 있다는 사실만으로 감사하며
더 아끼고 사랑하는 것이
행복한 삶입니다.     

반응형

'아침편지' 카테고리의 다른 글

기쁨을 발견하는 능력  (0) 2014.12.22
아, 어머니!  (0) 2014.12.22
땅의 시간, 하늘의 시간  (0) 2014.12.18
고통의 기록  (0) 2014.12.17
당신의 사막에도 별이 뜨기를...  (0) 2014.12.16
반응형

 

 

회사를 영어로 말하면 컴퍼니(company)다.
이 컴퍼니라는 것은 함께(com), 퍼니(빵),
즉 함께 빵을 먹는 동료들이라는 뜻이다.
그러나 컴퍼니로서 더욱 중요한 것은 먹는 빵 이상으로
뜻을 함께 먹는, 뜻을 공유하는 것이다.
동료가 되기 위해서 그 이상으로 중요한 것은 없다.
- 손정의 소프트뱅크 회장, ‘지금 너희에게 필요한 것은’에서
 

흔히들, 회사는 이익공동체라 합니다.
어떤 이해관계로 인해 구성원간 계약관계로 이뤄진 조직을 말합니다.
만약에 이를 이해타산이 아닌, 뜻을 공유하는 조직으로
만들 수 있다면, 그 힘은 엄청나게 커질 것입니다.
뜻과 의미, 가치를 공유하는 데 더 많은 시간과 노력을 투자해야합니다.

 

반응형
반응형

 


박해조 선생께 들은 이야기인데
저녁 9시부터 새벽 3시까지는 하늘의 시간이고
그 이외의 시간이 사람의 시간이라는 것이다.
특히 밤 11시부터 새벽 1시까지는 사람의 신체구조,
세포가 변하는 시간이니 그 시간에 잠을 자야
건강한 몸과 마음을 유지할 수 있다고 했다.
가능하면 하늘의 시간을 침범하지 않으려
하다 보니 아침이 한결 여유로워졌다.


- 조화순의《낮추고 사는 즐거움》중에서 -


* 땅의 시간이 있고
하늘의 시간이 있습니다.
땅의 시간에 움직이고 하늘의 시간에 쉬어야 합니다.
일 할 시간에 일하고 잘 시간에 자야 합니다.
이 시간의 법칙을 어기거나 거스르면
자기도 모르게 병을 얻게 됩니다.
큰 벌입니다.

 

반응형

'아침편지' 카테고리의 다른 글

아, 어머니!  (0) 2014.12.22
'미운정 고운정'  (0) 2014.12.19
고통의 기록  (0) 2014.12.17
당신의 사막에도 별이 뜨기를...  (0) 2014.12.16
이타적 사람, 이타적 공동체  (0) 2014.12.15

+ Recent posts