Attachments removed in new version?

5.68K viewsThemesattachment mime types upload
0

Hi guys,
I am using anspress with askbug, the paid theme. Since I’ve upgraded to the new version my attachments do not work anymore.
I have a custom mime type enabled in functions.php, but the new uploader only works with images. If I upload the file, the script tries to add a screenshot in the content area, and does not offer a direct download for the file.
Is there a way I can re-enable the old version of that code?
Thanks,
Levi

Answered question

Hello,
Can you let me see it quick?

0

Hello,
Since 4.1.8 uploaded files are not added as attachment by default. If you upload file you have to manually create attachment cpt. This was done done to prevent useless post creation while uploading files. Also to make upload process easier.
While saving file just create a new attachment CPT and set post parent to current question and attachment will appear in question again.

Posted new comment

Hi Rahul,

I’m sorry, but this doesnt help me a bit. Can you please write a step-by-step guide for me? How do I create a new custom post type? Would be great if you could show me an example

0

Hi Rahul,
I am posting more details here.
I cannot create a screenshot anymore as I updated the anspress and askbug, but your site still has this functionality here: https://anspress.io/questions/question/caching-and-anspress-4/

I am trying to achive a .model upload, and display the download links like the above screenshot. Have enabled the new mime type and allowed the upload in the plugin’s and the childe-theme’s functions.
Tried to follow your FAQ, but the page is broken: https://anspress.io/resources/faq/how-to-add-a-pdf-upload-field-in-anspress-question-form/
Managed to get the github IDs from the source code, and based on that I got the upload working to a point of Anspress accepting it. Once I tried to save the custom field the site hangs https://gist.github.com/rahularyan/7bd9c10783ce07d200f67c1042f52884
Do you have a working example that I can modify to my needs? I really need to get this working in the next few days?
Thank you!

Answered question