We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
process_file
Following along from README.md.
image_file = Contentful::Management::File.new image_file.properties[:contentType] = 'image/jpeg' image_file.properties[:fileName] = "#{@artist.slug}.jpg" image_file.properties[:upload] = @artist.image asset = @environment.assets.create(title: @artist.slug, description: '', file: image_file) asset.save asset.process_file
Fails with this error:
Message: Validation error Details: * Name: required - Path: '["fields", "file", "en-US", "upload"]' - Value: '' * Name: required - Path: '["fields", "file", "en-US", "uploadFrom"]' - Value: '' Request ID: xyz /Users/giles/.gem/ruby/2.3.1/gems/contentful-management-2.11.0/lib/contentful/management/client.rb:390:in `execute_request'
It seems that some properties are missing on the asset.file object.
asset.file
The following snippet completes without error:
image_file = Contentful::Management::File.new image_file.properties[:contentType] = 'image/jpeg' image_file.properties[:fileName] = "#{@artist.slug}.jpg" image_file.properties[:upload] = @artist.image asset = @environment.assets.create(title: @artist.slug, description: '', file: image_file) asset.file.properties[:contentType] = 'image/jpeg' asset.file.properties[:fileName] = "#{@artist.slug}.jpg" asset.file.properties[:upload] = @artist.image asset.save asset.process_file
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Following along from README.md.
Fails with this error:
It seems that some properties are missing on the
asset.file
object.The following snippet completes without error:
The text was updated successfully, but these errors were encountered: