I'm trying to get S3 SWF Uploader plugin working on my Heroku hosted RoR app.
At this point i have it installed, and i can upload files to my Amazon bucket... that's great!
But how can i get my hands on the callback functions? I simply can't find them!
Thanks
He has a list of all the Javascript callbacks in the README on GitHub: https://github.com/nathancolgate/s3-swf-upload-plugin
He also has a sample app which shows the code and how he's using the callbacks: http://s3swfuploader.heroku.com/
The one you'd be interested in is: :onUploadingFinish ()
Related
I'm trying to create a webapp for uploading some files, I created an amplify app (react) with a storage hooked up, now I would like to work the files either before being uploaded or after, to split and retrieve only some pages,
I confess that I don't know where to start to get this result, could you advise me where to start without using lambda
I followed the amplify guides to build the app and storage, and I used this component to upload files:
https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader
how can i get the result?
where should i start from?
I have several Playwright tests that use a webcam to capture videos and photos. Now they work with stubs via '--use-fake-ui-for-media-stream','--use-fake-device-for-media-stream'
I would really like to dynamically use video mocks for happy e2e tests.
After studying the problem a little, I managed to mock public .mp4 streams into the video element used for the webcam feed.
In my CI/CD pipeline, all test data (including camera videos) are stored as pre-signed AWS S3 links like https://my-e2e.s3.amazonaws.com/resources/my-face.webm?AWSAccessKeyId=ABC123FAKE&Signature=ABC123FAKED&Expires=1660724194
But such videos don't work at all with the suggested CaptureStream workaround.
You can check the working snippet in jsfiddle playground
I have a bad feeling it might be restricted by:
Attempting to use captureStream() with a media element that implements content protection via Encrypted Media Extensions will throw an exception.
Or I am missing something about streaming videos from AWS...
UPD Oct 2022: Adding * as allowed origin to CORS settings of S3 bucket resolved my issue.
References:
How to mock a video dynamically using JS
How captureStream works with video elements
I was checking Imageresizer S3 Reader2 plugin, and I have the following question.
My app is basically a c# REST API that has a functionality of serving
photos (resized photos).
Would it be possible to use Imageresizer+Amazon S3 with REST API so I can resize
photos in with Imageresizer in c# before serving it and without transferring original photo over network?
You'll have to transfer the original photo from S3 to your server (at least once) in order to resize it. The S3Reader2 plugin does this automatically. If you want to prevent repeat requests, look into SourceDiskCache.
Otherwise, that's exactly how ImageResizer+S3Reader2 functions.
I am creating a mobile app through Phonegap as the client and using Rails as the back-end. I am deploying my app to Heroku and am planning to use S3 to store the image files, because that is what is recommended from my various readings online.
I was wondering how could the Rails controller be used to send images back from Ajax requests from Phonegap.
I am not sure how to write the back-end API code to send images to requests.
I also read that using the send_file method without x-send_file enabled will slow down the server because sending the image would block other request until it is done.
Please let me know if you have any insights.
You could use redirects to the S3 assets here, then your browser is just getting the image directly, and not holding up one of your server processes while the browser slowly downloads the images.
If you need to keep your images private you can use the signed URL feature of S3 to only give signed and time limited URL's to the appropriate users. (See my commit to Paperclip: https://github.com/thoughtbot/paperclip/pull/292)
Is it possible to upload files to Rackspace Files Cloud from browser like in Amazon S3?
If you are speaking about uploading via the browser then you can use https://manage.rackspacecloud.com/ which has a nice web interface to upload your files.
If you want to have an API call from the browser since the API is all in REST it should not be too hard to implement it in JavaScript, I haven't seen any library/binding in JavaScript but this should be pretty straightforward to do straight with jQuery or such, see this SO article for some examples :
JavaScript REST client Library
and this is a link for the REST documentation of Rackspace CloudFiles :
http://docs.rackspacecloud.com/files/api/cf-devguide-latest.pdf