Hello people, So I am having trouble uploading a file to my bucket. I have the proper credentials all set. The problem is when I try doing a
putRequest('bucket', 'keyName', 'fileFullPath') it will only save the file name and not the bytes. So I try sending it as an input stream to a byte array. This way it says there is no such file at specified location? I am running linux so It says no specified file at /home/{user}/pictures/example.jpg This is the problem I believe because it is searching from /home and not /

Java Code:
    public String uploadImage(@RequestParam String fileName, Model model)
    throws IOException, NoSuchAlgorithmException, InvalidKeyException {
    try {    

        File file = new File(fileName);
        InputStream is =  new FileInputStream(file.getAbsolutePath());
        byte[] contents = IOUtils.toByteArray(is);
        InputStream stream = new ByteArrayInputStream(contents);
        ObjectMetadata omd = new ObjectMetadata();
        AmazonS3 s3client = new AmazonS3Client();  
        PutObjectRequest update = new PutObjectRequest("wandering-wonderland-images", fileName, stream, omd)
	    String saved = fileName + " is uploaded successfully";
	    model.addAttribute("saved", saved);
    } catch (Exception e) {
    return "redirect:/saved3";