Hello, i have the question like already mentioned on the title…
Is it possible to UPLOAD a SVG-file by code?
- Using the normal UPLOAD-BUTTON → this will not work!
- Searching for solutions did not work either.
- Last option → trying to code it.
Looking into possible provided APIs i could not find the right one, which could handle my problem.
Uploading JPEGs, GIFs, PNGs and others is not the big problem, but SVGs does not work.
It seems that the only way is to do that by using manualy the Wix-Manager.
So my questions would be:
- Is it at all possible to achieve my aim?
- If YES -->, where to find the right infos?
- If NO → a possible workaround/bypass possible? Generating something similar?
In the VELO-API-DOCs we can find this one…
But there are no real DETAILs → which image-formats are accepted exactly?
And what would be → “Shapes”
Looking deeper into all the issued situation, i found also this one…
SVGs are normaly a supported part of IMAGE-FORMATS in every browser, so why it shouldn’t be possible to upload them by code?
Do someone have any idea or hint on this topic?
EDIT: What is different in the upload-process between for example a PNG-FILE and a SVG-FILE?
I do not see any difference.
Process for png-file-upload:
-decode from PNG to BASE64
-encode from BASE64 to SVG
The same for a SVG-FILE, so why it do not work, when trying to UPLOAD a SVG to the MEDIA-MANAGER using CODE?