-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open failed: ENOENT (No such file or directory) #78
Comments
Can you add your code snippet? Also, when you use the URI to display the image locally, does it work correctly? |
even for me issue is the same var file = File(userProfileUrl.toString())
val reqFile = file.asRequestBody("application/image".toMediaTypeOrNull())
val imageBody = MultipartBody.Part.createFormData("image", file.name,reqFile) |
Please try I this new version: 2.3.21 and let me know if it fixed the issue or not |
@Drjacky Here is my snippet which I integrated. ImagePicker.with(this)
.galleryOnly()
.galleryMimeTypes(
arrayOf(
Constants.MIMETypes.IMAGE_PNG,
Constants.MIMETypes.IMAGE_JPEG,
Constants.MIMETypes.IMAGE_JPG,
),
)
.createIntent()
.also {
selectImageCropResultLauncher?.launch(it)
} Uri: content://media/picker_get_content/0/com.android.providers.media.photopicker/media/1000154898 File path Data -> /sdcard/.transforms/synthetic/picker_get_content/0/com.android.providers.media.photopicker/media/1000154898.jpg use this method to upload a file to the server. val multipartBody = MultipartBody.Part.createFormData(
name = "file",
filename = imageFile.getName(),
body = imageFile.asRequestBody(contentType = "image/*".toMediaType()),
) Please help to fix this issue. |
Hi, I try save result uri to file, that upload to server, but i get this error to upload "open failed: ENOENT (No such file or directory)"
The text was updated successfully, but these errors were encountered: