You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Adi4
2 years agoExplorer | Level 3
Help to remove error
Hi everyone, Good morning
I got a error when I try to upload a pic using dropbox
This is image path that I give: "C:\Users\ADITYA\Downloads\imagetest.jpg"
This is error that I get :
Image file not found at the specified path: C:/Users/ADITYA/Downloads/imagetest.jpg
Reason:
Snap failed unexpectedly and did not provide any reason
This is code for operation :
This is code for operation :
case UPLOAD_PICTURE:Please help me to resolve the problem
String pathToImageFile = "C:/Users/ADITYA/Downloads/imagetest.jpg";
String fileName = "imagetest.jpg";
String dropboxPath = "/apps/imagetest.jpg"; // Change this to the path you desire in Dropbox
try {
Path imagePath = Paths.get(pathToImageFile);
if (Files.exists(imagePath)) {
try (InputStream in = new FileInputStream(pathToImageFile)) {
FileMetadata metadata = client.files().uploadBuilder(dropboxPath)
.uploadAndFinish(in);
outputViews.write(documentUtility.newDocument(metadata));
}
} else {
throw new RuntimeException("Image file not found at the specified path: " + pathToImageFile);
}
} catch (IOException | DbxException e) {
throw new RuntimeException(e);
}
break;
- Greg-DBDropbox Staff
Based on the error message, that looks like an issue interacting with the local filesystem, not the Dropbox API, so we can't offer help with that. I suggest referring to the documentation for your platform for information on how to access and debug use of the local filesystem.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,889 PostsLatest Activity: 5 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!