Can you post the exact errors you got?
Also tell me how I can reproduce the problem.
Thank you.
Thread Starter
yst14
(@yst14)
I exported a .json file from my plugin. I am then trying to import the same file into my plugin.
Firefox: The uploaded file type is not supported: application/txt
Chrome: Works
Safari: Works
Earlier when i tried with the same export file I had the following:
Firefox: The uploaded file type is not supported: application/txt
Chrome: text/html
Safari: application/txt
It seems to be very intermitent but you can download the latest version of the plugin from this link and try it yourself. I am using a blank WP install.
Repo:
https://bitbucket.org/ben_noou/noouswatches/
Download:
http://bhwd.me/noouswatches.zip
Install Plugin
Go to swatches
Add colour & save
Go to options
export settings
import the exported file.
Thanks
Ben
Hi,
I tried your plugin and saved some colors, exported the options, deleted some colors and saved the options, and imported the exported json file. Then the colors got updated without any error in FireFox and Chrome.
It might be something to do with your server configurations. Do you have a different server that you can test?
Thread Starter
yst14
(@yst14)
I will try on another VPS that I have and come back to you.
Thanks
Ben
And
Is it at all possible to define more than 1 mimetype?
Yes you may add the one caused the error.
public function import_mime_types_noou_swatches_options( $aMineTypes ) {
$aMineTypes[] = 'application/json';
$aMineTypes[] = 'application/txt';
return $aMineTypes;
}
Not sure if it helps because I don’t get the error you got.
Thread Starter
yst14
(@yst14)
Just tried it on another hosting (not VPS) and in firefox I am having an application/txt error as per above.
Is it possible to define these formats all together to prevent this?
Is it possible to define these formats all together to prevent this?
You can try the above code posted in the previous reply. Let me know if it works or not.
Thread Starter
yst14
(@yst14)
That seems to have worked! No more issues when adding in the other mimetypes.
Thread Starter
yst14
(@yst14)
Only thing left to do is try and wrap certain page arrays in an IF for the licensing.