base64url

Questions about Base64 encoding

僤鯓⒐⒋嵵緔 提交于 2021-01-29 08:47:19
问题 I have 3 questions about base64: 1) The base64 encoding purpose is binary-to-text. Isn't text going to be sent through web as binary? Then what is good for? 2) In past they used 7-bit communication systems, now it's 8-bit. Then why we still using it now? 3) How it increases the size? I just take 3-bytes with 28-bit and rearrange them to 4-bytes of 6-bit but in total they still 28-bit? 回答1: 1) The purpose is not only binary to text encoding, but also to encode text which uses specific

How to get files as url from laravel storage folder and convert them as base 64 in vuejs?

依然范特西╮ 提交于 2020-12-15 06:32:49
问题 i'm trying to get files from storage folder and converting them into base64 in vue.js. i'm using below method, But it seems not working. public function getImages() { $filesToReturn = []; $files = File::files(storage_path() . "/app/record_keeper"); foreach ($files as $file) { array_push($filesToReturn, $file->getRealPath()); } return response()->json(['files' => $filesToReturn], $this->response_status_code, 200); } returned file urls {"files":["/home/Project/vue_image_previewer/storage/app

String based data encoding: Base64 vs Base64url

时光怂恿深爱的人放手 提交于 2019-12-02 00:31:27
What is the difference between Base64 and Base64url that I see in things like JSON web tokens? Both Base64 and Base64url are ways to encode binary data in string form. You can read about the theory of base64 here . The problem with Base64 is that it contains the characters + , / , and = , which have a reserved meaning in some filesystem names and URLs. So base64url solves this by replacing + with - and / with _ . The trailing padding character = can be eliminated when not needed, but in a URL it would instead most likely be % URL encoded. Then the encoded data can be included in a URL without

String based data encoding: Base64 vs Base64url

让人想犯罪 __ 提交于 2019-12-01 06:51:35
问题 What is the difference between Base64 and Base64url that I see in things like JSON web tokens? 回答1: Both Base64 and Base64url are ways to encode binary data in string form. You can read about the theory of base64 here. The problem with Base64 is that it contains the characters + , / , and = , which have a reserved meaning in some filesystem names and URLs. So base64url solves this by replacing + with - and / with _ . The trailing padding character = can be eliminated when not needed, but in a