Questions tagged [base64url]

Specifically for URL-safe base64 encoding. Uses - and _ instead of, respectively, + and /. Padding with = is optional. Source: https://en.wikipedia.org/wiki/Base64#URL_applications

107 questions
1
vote
1 answer

Django - How to decode a base64url and render it in Django template

In my view function, I am sending a form to an endpoint then I receive a response in JSON. The response is then displayed on the template after the form has been submitted. The problem is that a key in the response is a photo that is encoded in…
PercySherlock
  • 371
  • 1
  • 2
  • 12
1
vote
1 answer

Correct way to generate JWTs

I am new to JWTs so I used an article that told me to generate JWT like this: // Create token header as a JSON string $header = json_encode(['typ' => 'JWT', 'alg' => 'HS256']); // Create token payload as a JSON string $payload =…
bboek
  • 40
  • 3
1
vote
1 answer

base64_decode showing corrupted characters

I am building a hyperlink that includes a base64 encoded set of parameters as shown below: $params = base64_encode("member_id={$recipient_id}&api_key=".SECRET_KEY); $link = HOST_ADDRESS."test.php?k=" . $params; When the link is executed, the…
Tim
  • 31
  • 5
1
vote
0 answers

JS image to base64 return string

I have code that works fine function convertImgToBase64URL(url, callback, outputFormat){ var img = new Image(); img.crossOrigin = 'Anonymous'; img.onload = function(){ var canvas = document.createElement('CANVAS'), ctx =…
RQEST
  • 107
  • 1
  • 9
1
vote
1 answer

Drag and drop area with react-dnd

I'm trying to create a drag and drop area for uploading a single picture and I want to pass it to the application state in the base64 encoded URL using a function onDrop. import React from "react"; import {useDrop} from 'react-dnd' export default…
Helen
  • 463
  • 2
  • 9
  • 23
1
vote
2 answers

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

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() .…
madusanka
  • 163
  • 1
  • 13
1
vote
1 answer

How to add background image using AWS SES Email Template

From EC2 Linux, using AWS SES email template I am trying to send an email with background image. However, image and the script build in json located in the same path. But still I am not able to see background image in an email. Below is the HTML in…
1
vote
2 answers

Gmail can't decode multiline base64 encoded message

I'm using Swift_Message to construct the message and Swift_Mime_ContentEncoder_Base64ContentEncoder to encode the message,then in Google_Service_Gmail_Message I'm setting the encoded mesage with ->setRaw() method. I've been sending mail with this…
Rocky
  • 519
  • 6
  • 18
1
vote
0 answers

Encoding email as base64 in Python 3

I'm trying to create and send an email using gmail, based on the instructionshere to encode as base64. I create the message in this way: import smtplib from email.mime.text import MIMEText import base64 to='name@gmail.com' sender =…
doctorer
  • 1,672
  • 5
  • 27
  • 50
1
vote
2 answers

Convert Image to Base64 String from URL download

I have a problem, I want to convert an image from a url to base64, but I get an error This is the url: https://www.jotform.com/widget-uploads/imagePreview/92613577901663/2922362Principios%20-%20Resultados.png public String…
stvn03
  • 43
  • 2
  • 2
  • 5
1
vote
1 answer

To Convert Base64 URL to Base64 Encoded format in WSO2 EI 6.3.0

I am getting email attachment(images) from Gmail API which returns base64url encoded string. But actual encoded is different from this gmail api("/" is replaced by "_" and "+" is replaced by "-" etc). I want to get original base64 encoded string…
Justin
  • 855
  • 2
  • 11
  • 30
1
vote
0 answers

Convert all images into base64 in Angular 8

Assume that we are using angular-cli in an Angular 8 application. Is there a proper way to make ng build to convert all the images (which are mentioned in css, eg. background: url(/assets/myPic.png) ) into base64 string? AFAIK the problem is that…
Burnee
  • 2,453
  • 1
  • 24
  • 28
1
vote
2 answers

JWT Go/Golang base64 encoding payload yields different results

i have the following JWT payload: {"exp": 4724377561} (some date 100 years from now) Encoding it in Go yields ewogICAiZXhwIjogNDcyNDM3NzU2MQp9 Using jwt.io it is however encoded to eyJleHAiOjQ3MjQzNzc1NjF9 which yields a different signature when…
Arne Winter
  • 13
  • 1
  • 4
1
vote
1 answer

How to show an image with token with axios in vuejs

I have a api rest that returns a list of articles associated with an image, the service requires a token. The problem I have is when trying to show the images of the article, since they need the token. I show part of the code to help me with your…
Flaquito183
  • 49
  • 1
  • 7
1
vote
0 answers

base64 string to jpg file object using JavaScript

I'd like to convert a base64 string into a jpg file object using JavaScript. I have tried the following (as per this thread), but it's returning me a corrupted file when I attempt to download the jpg image: this.urltoFile(screenshot, 'file.jpg',…
Sagar Mohan
  • 145
  • 1
  • 5
  • 17