Answer the question
In order to leave comments, you need to log in
How to pass pure base64?
when loading a JSON file in the input type file in event.target.result - a string like data:application/json;base64,ew0KICAiaGVhZGVyIjogew0KICAgICJsYXVuY2hwYWQiOiAiTGF1bmNocGFkIiwNCiAgICAicHJpc20iOiAiUHJpc20iLA0KICAgI is passed
how to remove this prefix data:application/json;???? to leave base64,ew0KICAiaGVhZGVyIjogew0KICAgICJsYXVuY2hwYWQiOiAiTGF1bmNocGFkIiwNCiAgICAicHJpc20iOiAiUHJpc20iLA0KICAgI
Answer the question
In order to leave comments, you need to log in
If you want to insert this base64 file into the input field, then you asked the wrong question, because removing the prefix will not help you here, and inserting is done in a completely different way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question