Its not possible to send File via Rest...
thisisole opened this issue · 1 comments
thisisole commented
i want to get my data via rest api.
for this i get a json like this:
"avatar": {
"content": "/9j/4AAQSkZJRgAdBAQEAkACQAAD/4QBaRXhpZgAATU0AKgAAAAgABQMBAAUA\nAAABAAAASgMDAAEAAAABAAAAAFEQAAEAAAABAQAAAFERAAQAAAABAAAWJVES\nAAQAAAABAAAWJQAAAAAAAYagAACxj//bAEMAAgEBAgEBAgICAgICAgIDBQMD\nAwMDBgQEAwUHBgcHBwYHBwgJCwkICAoIBwcKCgoLDAwMDAcJDg8NDA4LDAwM\n/9sAQwECAgIDAwMGAwMGDAgHCAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM\nDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAFQAUAwEiAAIRAQMRAf/E\nAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMF\nBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJ\nChYXGBk=\n",
"content_type": "image/jpg",
"filename": "test.jpg"
},
then i am getting this error:
Paperclip::AdapterRegistry::NoHandlerError in Api::V1::UsersController#create
No Handler found
so i use a function from this example http://paoloibarra.com/2014/09/27/Image-Upload-Using-Rails-API-And-Paperclip/ but it seems not to be working with paperclip_database
in my logs are following entries, but nothing is stored in the database. no other error... its just ignoring the avatar:
[paperclip] Database Storage Initalized.
[paperclip] Deleting files for avatar
[paperclip] Writing files for avatar
thisisole commented
totally my fault...