This topic is locked
[SOLVED]

 Upload file size limit

1/20/2018 10:31:07 AM
PHPRunner General questions
B
Bill author

I have a form that allows users to upload images/pdf files to a Mysql mediumblob field.

In Phprunner 9.8 this field is set to Fields / Properties / File and points to the name of the database field.

Everything works perfectly, but I wanted to set a limit, say 500K, on the maximum file upload size.

How can I do? Thank you

HJB 1/20/2018

https://xlinesoft.com/phprunner/docs/edit_as_settings_file_image.htm
... view ADVANCED SETTINGS screenshot content inside ...

B
Bill author 1/20/2018

Thanks for the help, but unfortunately I can not save files in a folder of the server but only in a field of the database, my situation is that described in the manual page indicated, at the bottom, in the chapter "Binary field: File" and "Advanced Settings" is not available.

I do not know if it is possible to set the field from "Binary field: file" to "Text file" and insert PHP expression "$folder=..." an sql instruction that saves the file loaded in the database. It does not seem like a good thing, I look for other methods, if anyone has an idea, thank so much!

admin 1/20/2018

I'm not sure I understand. Why cannot you upload files to the web server as opposed to uploading to database?

B
Bill author 1/21/2018

In fact it is possible, but the provider has little space available, while the Mysql service I have much more. I try to avoid making a change of provider and I'm evaluating if there are any possible solutions. With all the data in the database I think it is easier to manage the cleaning of old data, but if there is no other solution I have to follow the new path by uploading the files to the server (after changing the provider!). I immediately get a doubt, what happens if a user uploads a file with the same name as an existing one? Is it renamed automatically or do I have to handle the error? Thank you for your time that you dedicate to me

mbintex 1/22/2018

Indeed an option for limiting file sizes in fields in missing, although a limit for images in blob fields is existent.

B
Bill author 1/25/2018

I solved by uploading files to the web server instead of the database