This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

API Request: Document Upload create only a Corrupt File within M-Files

Hello,

I am currently struggling with uploading documents to M-Files via the REST API. I am using a Laravel PHP application to create the request. From the technical side, the following works so far:
• Authentication
• Creating an UploadFile
• Creating a SingleFileDocument or MultiFileDocument

However, the file in M-Files has the correct filename and file type but is always just an empty container. The actual document content is never uploaded and the file is corrupt.

What am I missing?


UploadFileRequest

CreateSingleFileDocument

Best regards

Sebastian

Parents
  • What's the result of that initial request?  Can you show the raw HTTP request/response that this PHP causes?  My suspicion is that is somehow incorrect.

    Honestly, I know that you can submit multiple files via this but for a single file it's often easier to simply pass the file content up in the body.

Reply
  • What's the result of that initial request?  Can you show the raw HTTP request/response that this PHP causes?  My suspicion is that is somehow incorrect.

    Honestly, I know that you can submit multiple files via this but for a single file it's often easier to simply pass the file content up in the body.

Children
No Data