Json-server: How to upload an image to json-server?

Created on 9 Oct 2017  路  6Comments  路  Source: typicode/json-server

How to upload an image to json-server? Is there anyway to receive image and save it on server by easy method or API?

Most helpful comment

leave it alone

All 6 comments

leave it alone

ehh~~~ I think so

Dude, json-server it's to deal with JSON only.

You can store in a base64 string, see https://github.com/typicode/json-server/issues/528#issuecomment-301246568

Any solution, @xuyanquan?

There is no answer

Well, this is old but I agree with @phsantiago that you could store a base64 string. Another solution may be to upload the image to an image host and store the public URL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

casvil picture casvil  路  4Comments

dotmobo picture dotmobo  路  4Comments

TXRRNT picture TXRRNT  路  4Comments

ashleydavis picture ashleydavis  路  3Comments

strom picture strom  路  4Comments