l0vey0u / ToDo

2 stars 1 forks source link

Base64의 비밀 알아내기 #60

Closed l0vey0u closed 4 years ago

l0vey0u commented 4 years ago

https://stackoverflow.com/questions/27886677/javascript-get-extension-from-base64-image

여기서

32

A bit late but it seem the question was misunderstood. He just only had the base64 content of the image, not the full data URI.

I wrote here for anyone who encounters with this quest, you can read the first character of content content.charAt(0). By base64 image content if the first char is:

'/' : jpg

'i' : png

'R' : gif

'U' : webp

So for your case, it is 'jpg'.

이 단락이 있는데 제대로 알고 싶다.

l0vey0u commented 4 years ago

알아봤는데 딱히 저런 내용이 없었다.