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
raw_post = request.raw_post | |
def generate_signature_from_raw_post(raw_post) | |
object_payload = JSON.parse(raw_post)['object_payload'] | |
object_payload_dump = Oj.dump(object_payload, escape_mode: :ascii) | |
hmac = OpenSSL::HMAC.digest('sha256', ENV['SECRET'], object_payload_dump) | |
Base64.encode64(hmac).strip | |
end |
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
<template> | |
<div id="video-uploader" class="row-multiple --last"> | |
<div v-show="ShowProgressBar"> | |
<progress max="100" :value="progressPercentage"></progress> | |
<span>{{ progressPercentage }} % (veuillez patienter...)</span> | |
</div> | |
<input class="button secondary hollow --alt-margin" type='file' v-on:change='onFileChange'></input> | |
<input type='hidden' name="tutorial[video]" :value="videoData"></input> | |
</div> | |
</template> |