Taro Singh
Joined
Activity
Hey Adam,
I did find the solution,
Firstly I did not include any stuff for shrines presign plugin. So based off this it would be
Shrine.plugin :presign_endpoint
in the Shrine.rb file
then
mount Shrine.presign_endpoint(:cache) => "/YOUR MODEL HERE/upload/cache/presign"
in your Routes.rb
then changing
$.getJSON("/YOUR MODEL HERE/upload/cache/presign", options, function(result) {
console.log("presign", result);
data.formData = result['fields'];
data.url = result['url'];
data.paramName = "file";
data.submit()
});
in the uploads.js file
Unless I'm forgetting something that should be the fix, let me know! But now I'm getting an issue where my form only uploads the cache file, never the full image and the form never submits.
Hey guys, this is driving me crazy. I'm pretty new to rails and I have been following the shrine & S3 videos using the cloud based ide c9. I got basic direct uploads to work flawlessly, but when I introduced jquery file upload on image attachment, chrome console returns after the add call.
There's probably something I'm not fully understanding here, can anyone guide me in the right direction?