Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Invalid size provided for UploadedFile; must be an int. #316

Open
ImmanuelKannan opened this issue Jul 14, 2018 · 4 comments
Open

Invalid size provided for UploadedFile; must be an int. #316

ImmanuelKannan opened this issue Jul 14, 2018 · 4 comments

Comments

@ImmanuelKannan
Copy link

Hi guys, I'm working on an iOS project and I'm required to send documents, such as pdfs, to my laravel server. The issue is, every time I try to send a post request for a PDF, I get this error message: Invalid size provided for UploadedFile; must be an int. I'm at my wit's end trying to solve this issue. Any ideas?

@Xerkus
Copy link
Member

Xerkus commented Jul 15, 2018

That exception is thrown here

if (! is_int($size)) {
throw new InvalidArgumentException('Invalid size provided for UploadedFile; must be an int');
}

That is all I can derive from the description, you need to be more specific. Stack traces, anything?

@Xerkus
Copy link
Member

Xerkus commented Jul 15, 2018

If laravel uses ServerRequestFactory to create request from php globals, try to do var_dump($_FILES); exit; with failing request and post result here

@mtnaghibi
Copy link

mtnaghibi commented Jul 23, 2018

Increase upload_max_filesize in php.ini

;Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 16M

Then
Restart Apache

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-diactoros; a new issue has been opened at laminas/laminas-diactoros#10.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants