R
R
Riley Usagi2018-02-06 18:13:19
Ruby on Rails
Riley Usagi, 2018-02-06 18:13:19

VueJs + Rails. file upload. Where is the mistake?

I send a file to the API via Axios and formData
Somewhere at the Rails level (before routing) such a beard comes out.
e4d6fd0eed0bea5d45a642daaddaee15.png
The Internet is silent on this topic.
Save me gentlemen.
Update: This situation occurs in the case of a .jpg file. In the case of .png we have:

Rack::QueryParser::InvalidParameterError (invalid byte sequence in UTF-8):

Text files work just fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nurasyl Aldan, 2018-02-07
@nurasyl

content-type: multipart/form-data; charset=utf-8 try using this header.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question