• Resolved jkees

    (@jkees)


    Media Sync Version: 1.2.3
    WordPress Version: 5.5.1

    Uploading image files works correctly without issue. When trying to upload PDF or ZIP files, the files will upload but an alert will prevent the task from finishing on the page:

    Alert Error

    Console Error (url redacted):

    [Media Sync][Import]: Attachment metadata could not be generated from /var/www/website.com/wp-content/uploads/temp/test.zip {“guid”:”https:\/\/www.website.com\/wp-content\/uploads\/temp\/test.zip”,”post_mime_type”:”application\/zip”,”post_title”:”test”,”post_content”:””,”post_status”:”inherit”} (in ajax_script.js?ver=1.2.3:72)

    This causes a headache when trying to sync multiple PDF or ZIP Files since we have to now sync one at a time and ignore the error.

    Is there a way we can exclude MIME types from metadata generation?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Hi @jkees,

    I’m thinking to add a new option (in settings of this plugin) which would tell this plugin to ignore those errors and continue processing all other files. Or even to always work like that.

    I’ll update this topic when I find some time to do that.

    Thank you for all the details.

    Erol

    Thread Starter jkees

    (@jkees)

    Thanks for the quick reply.

    I was able to circumvent the error for now by commenting out the attachment check in the MediaSync.class.php on line 745. Might just need an if/else for MIME type as a quick fix if you don’t want to wait till the settings are updated.

    Let me know if this gets updated in the next version and I’ll check it out. Great work on the plugin. It’s the best and most seamless way to sync FTP uploads to the Library.

    I kept getting the same popup error message. @jkees’s solution worked just fine. You’ve got a great plugin!

    Plugin Author erolsk8

    (@erolsk8)

    Huh I really need to handle those errors differently and continue importing other files.

    But I don’t want to just continue and not show that there was something wrong with some of the files. I’d like to show it somewhere in the UI.

    That’s why I didn’t yet get to make that change. But I’ll do it as soon as I find some time and I’ll update this topic.

    Thanks for the feedback.

    Plugin Author erolsk8

    (@erolsk8)

    Hey @jkees, I just pushed the new 1.2.4 version which should skip those failed files and continue importing the rest of selected files.

    Failed files will now have an error message below the file name and that default browser alert popup was replaced with error in the UI.

    Thank you @captaindrew80, I’m glad you like it and you might also want to check this new 1.2.4 version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Import Error with ZIP and PDF Files’ is closed to new replies.