adominey
adominey

Reputation: 102

Rails: receive and send images

I'm writing rails application. My task is to show data from old java application. One of the objects has images attached, I have to display these images and allow user to add new ones.

I want to know what is the best way to let user uploading images to old app.

Old app has http post method for adding images with params: multipart file, md5 hash of the image and object id.

I tried using paperclip or carrierwave but their documentation is about saving uploaded images and I just want to transfer them somewhere else and not save anything.

Upvotes: 0

Views: 63

Answers (1)

Oshan Wisumperuma
Oshan Wisumperuma

Reputation: 1948

there are few ways to communicate with java from ruby.

  1. REST API - expose Java functionalities through endpoints. then use an HTTP client.
  2. Remote Procedure Call - Apache Thrift
  3. JRuby - embedded java programme into Ruby

however, I think maybe you can just proxy the Java API without going through the rails application.

Upvotes: 1

Related Questions