Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File_advanced field mime_type deleting content #1171

Open
patrikniebur opened this issue Sep 27, 2017 · 0 comments
Open

File_advanced field mime_type deleting content #1171

patrikniebur opened this issue Sep 27, 2017 · 0 comments

Comments

@patrikniebur
Copy link

patrikniebur commented Sep 27, 2017

Hi, first of all thanks for a great plugin!

I'm using field with following settings

array(
	'name'             => 'Document',
	'id'               => "meta_resource_card_pdf",
	'type'             => 'file_advanced',
	'max_file_uploads' => 1,
	'mime_type'        => 'application/pdf'
),

Now I know that this only filters entries in a media library, and doesn't restrict anyone to upload different type of document. Issue is that our client have uploaded .doc file types, and when they came back to edit content this field didn't load .doc file entry (due to non matching mime-type I assume) and as they hit save this field has been overwritten with empty entry essentially deleting the content that has already been there without them knowing anything.

Ideally it would be great if it didn't let them upload different type of document. As it's currently not possible, it would be helpful if this field was populated with uploaded content when edit screen is refreshed.
I hope this makes sense.

I'm happy to attempt to fix this, just wanted to notify anyone with similar issues to prevent some headaches here.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant