Hello ,
Please is there a way to extract a zip archive from the backend.
I created a post typw with custom fields to upload the zip file . The admin needs to extract the uploaded file since the archive contains an html file which he needs to add as an iframe linked to it.
The client has a program which creates a folder with html file showing a 360 image for Apartments.
Then the client archives the folder --> creates a new post --> uploads the archive to the woordpress backend --> The archive will be extracted when he saves the post --> On the front page a link for the html file will be shown in an iframe .
I can't manage to extract the uploaded file and then how to get the link of the iframe from the extracted file using toolset.
Hello and thank you for contacting the Toolset support.
You can hook into the form save action, then unzip the file and build your iframes URLs the way that suits you.
The action to hook into is cred_save_data: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
Get the URL of the uploaded file with Types API: https://toolset.com/documentation/customizing-sites-using-php/functions/#file
Unzip the zip file with WordPress API: https://developer.wordpress.org/reference/functions/unzip_file/
Then depending on where you extract the zip file, you can build the URLs for the iframes.
I hope this helps. Let me know if you have any questions.