JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
166 stars 50 forks source link

"You may not upload without the key parameter" 25mb mp4 #72

Closed Puyodead1 closed 4 years ago

Puyodead1 commented 4 years ago

I can upload jpg, png, and smaller mp4 files just fine but when i tried to upload a 25mb mp4 file i keep getting an error that i cant upload without the key parameter.

Could this be caused by php settings?

JoeGandy commented 4 years ago

Hi, Yeah this will be the settings in php upload_max_filesize, post_max_size, memory_limit

You can update these directly on your server, I'll see what i can do about making the error message more clear

theaquarium commented 4 years ago

So I've added a bit of code to check if uploads exceed this maximum upload size in Version 2. Trying to detect this was an interesting challenge, since PHP just seems to delete the $_POST data when files exceed post_max_size. The code now checks if that variable exists and a few other things, so hopefully maybe 🙏, Version 2 will send clearer error messages.

As Joe said, to be able to upload larger files, you'll have to adjust the upload_max_filesize and post_max_size directives in your php.ini. Make sure post_max_size is larger than upload_max_filesize.