DEV Community

Active Storage. Storing Files With a Rails API

Josiah on April 01, 2023

Are you in the quite specific scenario of wanting to upload photos to a rails backend with a react front end but don't know how? I've got you cover...
Collapse
 
fabianpinop profile image
Fabian Pino • Edited

I followed all the steps but I get the following error please help
ActionDispatch::Http::Parameters::ParseError (767: unexpected token at '------WebKitFormBoundaryxaYAnLtlkajqzq9E

Collapse
 
prajaychaudhary profile image
Prajay Chaudhary

Did you able to solve that problem?

Collapse
 
fabianpinop profile image
Fabian Pino

Yes it's already solved I forgot to leave a comment

Thread Thread
 
prajaychaudhary profile image
Prajay Chaudhary

How did you solve that?. Can I have the repo please?.

Thread Thread
 
fabianpinop profile image
Fabian Pino

in my case the problem was in the headers I had not noticed that content type application json was being sent basically it is not necessary to send something in the header unless you need token or something similar since when sending the form data it reads it as multipart

Thread Thread
 
fabianpinop profile image
Fabian Pino

I'm sorry but the repository is private to the company where I work