When uploading a file via the Upload Field, I see that Formidable Forms creates a folder named with the ID of the form. I'd like to know if there is a way to create a folder for each month and year just like wordpress does.
It depends on what exactly you mean. You can definitely use that hook to create new folders by issuing simple PHP commands (e.g., https://www.w3schools.com/php/func_filesystem_mkdir.asp) and then that becomes the folder it's saving to. Let me know why it doesn't suffice and I'll try to think of another solution.
Thank you Rob! I wonder if this is the right solution..I'll give you a deeper explanation of what I am dealing with.
I've got an upload field and the images are then sent to PDFMonkey to build PDFs. This is done via Zapier. All the images are uploaded into one folder.
It has worked happily and fine so far, but i started receiving a timeout error from PDFMonkey.
I spoke with the developers and they are saying that when they try to download any image they experience a heavy content download time. They say that depends on the hosting and the OS capabilities.
But I tried to change the uploading folder and I am still getting the time-out error.
I also cleared some of the files and it worked fine for a little and then it stopped again. I believe this happened because some more files got uploaded.
The error happened when changing the upload folder of the images. The previous folder and this new one are both subfolders of a parent folder called "Upload". I don't know if that is an issue with the number of files in the main folder and/or the size of the files. Some files can even be 230mb.
Well, I don't know enough in general or specific to your project to give a meaningful answer, so I'll just throw some ideas out there:
1. Make a separate directory for each user/entry so that there won't be as many files in each directory. It's possible the issue is that instead of sending some files, it's sending all each time.
2. Revisit using Zapier and PDF Monkey and either find a way to send just the URLs of the files to the service instead of the actual files or figure out another way to do what you're doing. Honestly, it seems odd to me that you're sending a bunch of files to a service so that it can make a PDF file.
Please login or Register to submit your answer