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

FileField is not supported #11

Open
gregoriopellegrino opened this issue Sep 6, 2016 · 2 comments
Open

FileField is not supported #11

gregoriopellegrino opened this issue Sep 6, 2016 · 2 comments

Comments

@gregoriopellegrino
Copy link

It is not possible to import a file using a FileField

@andrewdodd
Copy link
Owner

Well....this is technically correct but I do have a work-around for now.

https://django-nsync.readthedocs.io/en/latest/examples.html#example-complex-fields

The alternative might be to add in special handling looking for fields that expect a file....

@gregoriopellegrino
Copy link
Author

I've fixed it around line 200:
if (type(field) is models.FileField or type(field) is models.ImageField) and value is not '': file = open(value, "rb") value = File(file)

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

2 participants