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

Asset are not creating File objects for files that are not the default locale #129

Closed
dlitvakb opened this issue Apr 4, 2017 · 0 comments
Assignees
Labels

Comments

@dlitvakb
Copy link
Contributor

dlitvakb commented Apr 4, 2017

Assets are not properly coercing files in all locales to Contentful::File objects, only the default locale.

Example:

> asset.instance_variable_get(:@fields)
=> {"en-US"=>
  {:title=>"EN Title",
   :description=>"EN Description",
   :file=>
    #<Contentful::File:0x007fcc52b49aa8
     @content_type="image/svg+xml",
     @details={"size"=>899},
     @file_name="Flag_of_the_United_States.svg",
     @url=
    "//assets.contentful.com/bht13amj0fva/14bZJKTr6AoaGyeg4kYiWq/13f00bdf75c1320061ce471a3881e831/Flag_of_the_United_States.svg">},
 "es"=>
  {:title=>"ES Title",
   :description=>"ES Description",
   :file=>
    {"url"=>
      "//assets.contentful.com/bht13amj0fva/14bZJKTr6AoaGyeg4kYiWq/5501c98c296af77b9acba1146ea3e211/Flag_of_Spain.svg",
     "details"=>{"size"=>60255},
     "fileName"=>"Flag_of_Spain.svg",
     "contentType"=>"image/svg+xml"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant