tallaljamshed's avatar

file not uploading

im trying to upload word, pdf, excel files. project is working fine for 1 year now with almost all files with few exceptions. sometimes some files simply refuse to upload. giving me only message from request validation ... " The file failed to upload. " Now how can I find the reason for this. A direct answer will help too but if somebody can just tell me how can i see raw exceptions on request validation instead of fancy error messages.

0 likes
3 replies
sr57's avatar

There many reasons, outside of Laravel, for this (size too big, not the good rigths, ...) you should see the reason in your logs.

tallaljamshed's avatar

oh sorry I failed to mention size is 12 kb . rights are ok . As I said it's working fine mostly . just for few files this happens sometimes so i need better understanding of raw exceptions.

tallaljamshed's avatar

ok turned out error:6

+files: Symfony\Component\HttpFoundation\FileBag {#48 ▼
    #parameters: array:1 [▼
      "file_name" => Symfony\Component\HttpFoundation\File\UploadedFile {#33 ▼
        -test: false
        -originalName: "testing document (10).docx"
        -mimeType: "application/octet-stream"
        -error: 6
        path: ""
        filename: ""
        basename: ""
        pathname: ""
        extension: ""
        realPath: "/home/uaarclassuaaredu/public_html/public"
        aTime: 1970-01-01 05:00:00
        mTime: 1970-01-01 05:00:00
        cTime: 1970-01-01 05:00:00
        inode: false
        size: false
        perms: 00
        owner: false
        group: false
        type: false
        writable: false
        readable: false
        executable: false
        file: false
        dir: false
        link: false
      }
    ]
  }

which on google search turned out to be "UPLOAD_ERR_NO_TMP_DIR"

Please or to participate in this conversation.