jeckman / wp-insta-import

Script for use with wp-cli eval-file to import a json formatted instagram export
GNU General Public License v3.0
0 stars 1 forks source link

Media without file extension fails #11

Open jeckman opened 1 year ago

jeckman commented 1 year ago

Sometimes the Instagram export contains media whose filenames don't have any extension. These seem, in my case, to actually be MP4 files.

I believe the import of those items now just silently fails - likely the wp_upload_bits call is failing with an error about file type.

Need to do some error checking there and do something with the info - for now likely just log it / output to user.

jeckman commented 1 year ago

I could enable unfiltered uploads, but not sure that's the right approach since WP may still not recognize and use the attachment without being able to determine its mime type