
Anonymous Community User asked a question.
Multipart/form-data error when trying to upload a file.
I'm using the Podio-php library and heaving trouble uploading a PNG image. Here's my code: $image = Input::get("image"); $image = str_replace('data:image/png;base64,', '', $image); $image = str_replace(' ', '+', $image); $image = base64_decode($image); $fileName = 'task-' . $task_result->task_id . '.png'; Storage::put($fileName, $image); $filePath = storage_path('app'). '/' . $fileName; info('File Path: ' . $filePath); $file_result = PodioFile::upload($filePath, $fileName); The error I get is: PodioBadRequestError: "'source' parameter must given as multipart/form-data with type 'file'" Is it something wrong in the library or am I doing something wrong? Thanks in advance!