override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { if (resultCode == Activity.RESULT_OK && requestCode == IMAGE_PICK_CODE) { val uri = data?.data if (uri != null) { imageView.setImageURI(uri) createImageData(uri) } } super.onActivityResult(requestCode, r...
Cloudinary's Kotlin SDK provides simple, yet comprehensive image and video transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Kotlin or Java application.Tip In this guide you'll learn how to get started with the ...
Here is the code that uploads an image : classPredictionsOutputHttpDataSource(privatevals3Client:S3Client,privatevaloutputS3Bucket:String,privatevaloutputS3Prefix:String, ) : PredictionsOutputRemoteDataSource {overridesuspendfunsave(predictionsLocalPath:String):String{valpredictionsLocalFile=File(predictionsLoc...
we will be using Spring to allow us to control these actions from the outside world. We will use Spring to create endpoints that we can use from outside of our deployment on Azure Container Apps, such as through a web backend. This is a common pattern that registrar...
The easiest way to do this is to create a new task of type DefaultSubTask, and adding code to run when the task is executed using doFirst/doLast. Using this approach, you must explicitly specify your dependencies up-front, as they cannot be detected automatically. For instance, say you ...
Golang and Kotlin provide code playgrounds to let users directly interact with sample programs. Check those out here and here.Another super-creative example of documentation is this YouTube channel by Andreas Kling. He regularly uploads screencasts about his project SerenityOS....
they have some drawbacks when it comes to compiler support, safety and traceability. Fortunately, we can leverage Kotlin’s sealed classes to create result objects that solve the mentioned problems. This way, we get great compiler support and the code becomes clean, less error-prone, easy to ...
https://feeds.feedblitz.com/~/902883230/0/baeldung/kotlin~Resolving-Warning-Return-can-be-lifted-out-of-when-in-Kotlin/feed 0 https://www.baeldung.com/wp-content/uploads/sites/5/2021/08/Kotlin-Featured-Image-150x150.pnghttps://www.baeldung.com/kotlin/test-resources https://feeds.feedblitz...
About the logger: you are right, the way it works is that it consumes the bytes of the uploads in order to print the body, which will make the rest of the chain fail later. Maybe there is a way to improve this (or at least warn in the documentation!) I'll have a look. sterien...
You have also the possibility to use multipart requests, you typically can use these requests for file uploads and for transferring data of several types in a single request. The only limitation with that, is that you can specify only one test case. ...