Technical Suggestion | Persisting Tempfile and uploading to S3 bucket Rails

54 Views Asked by At

I am working on

  1. Creating a Tempfile and write some content to it
  2. Pass the path to an active job and forward the path to a service file
  3. Read the Tempfile from the service file and upload it to s3.

My bottleneck, the Tempfile created in step 1 is not accessible outside the file or block.

Any suggestions or solutions that has worked for others before?

I tried to persist the tempfile to /tmp directly . No luck , the file gets deleted and i am never able to access it. Note: The file was created in the run time and tried to be persisted into the db

0

There are 0 best solutions below