Template file validation rules: analysis of file size limits
1. Refer to the template source code editing in the Shopify background, when uploading a file greater than 50 MB, the response 413 request entity too large. This should be limited by the settings of the Nginx server: client_max_body_size 50M . as shown in Figure 1
2. When uploading a 48.5 MB CSS file, it takes 2 minutes, the upload is successful, and the response is 200. as shown in Figure 2
3. When adding or editing a 368 KB Liquid and JSON files, the response 422 is responsive. The template content exceeds the limit of 256 KB. as shown in Figure 3
4. After adding a blank file 1.CSs.liquid under Assets, when editing, the content size of the added content is 1.81 MB . Save successfully.
5. Edit Hueman: Homepage template (index.php) in the appearance of the WordPress background – the update is successful, and the response is 200. It takes 1.5 seconds. as shown in Figure 5
6. Response 502 when adding content greater than 50 MB. There is a problem, your modification may not be saved, please try again. You may also need to manually repair and upload files via FTP. View responses in the network: Unable to load response data: Request content was observed from Inspector cache. Confirm that the newly added content has been successfully saved to the template file. Confirm by revisiting the contents of the template file. as shown in Figure 6
7. When adding 46.5 MB of content, the response 502. Finally until 22.8 MB, all responds to 502. To 22.7 MB, the response is 200.
8. Search the .php file in the theme directory in WordPress, the largest file is 1.59 MB. Search for the subject directory in WordPress: the .js file of which the largest file is 402 KB. Search for the subject directory in WordPress: .png file, the largest file size is: 911 KB. as shown in Figure 7
9. Finally, make your own rules: the size limit of the files in the assets directory is 10 MB (MySQL MediumBlob limit is 16 MB), and the size limit of the files in the locales directory is 2 MB, the size of files in other directories is limited to 512 KB.





