我有一個反應本機應用程序從設備讀取圖像文件作爲base64
字符串,並通過axios
將其提交到rails
應用程序。以下是正在提交的數據的一部分:如何將base64編碼文件提交到回形針?
/9j/4QBYRXhpZgAATU0AKgAAAAgABIdpAAQAAAABAAAAPgESAAQAAAABAAAAAAEBAAQAAAABAAAB4AEAAAQAAAABAAACgAAAAAAAAZIIAAQAAAABAAAAAAAAAAD/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAHgAoADASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAcGBQECCP/EAEIQAQAAAAcMBwQKAwEBAQAAAAAHERJFg8LSAgMEBQYVFhdUVZKjARMUMmWU0SMxpOIhIiQlJidDUWFxN0GBkbEz/8QAGAEBAQEBAQAAAAAAAAAAAAAAAAUGBAH/xAAmEQEAAAIKAgMBAAAAAAAAAAAAgaEFERUWQkNiY8HhBAYSFCEi/9oADAMBAAIRAxEAPwD8vjbatccbTgHHd2TVrjjacA47uyDEjbatccbTgHHd2TVrjjacA47uyDpQNzxQ11JTbE35e9dnr2/b5PVdk+vJkRxypUmLv9EXv/59EfT1lYn2bD+C4tA2wxOsrE+zYfwXFo1lYn2bD+C4tA2wxOsrE+zYfwXFo1lYn
問題是,我無法直接將此添加到回形針。我應該怎麼做才能使它工作?在模型
要downvoter:請考慮您解釋選擇 – Cherniv