Error in UPLOAD file

Error in UPLOAD file

marianidiegomarianidiego Posts: 46Questions: 15Answers: 1

I uploaded the files exactly according to your example in PHP:

https://editor.datatables.net/examples/advanced/upload.html

It works 99% of the time. There are occasions, however, that the file is not loaded correctly.

In this case I get the row created in the "users" table, but not the row in the "files" table.

In itself this is not a problem, I could delete the line and try again. Only datatables crashes and no longer works....

What can I do?

One more thing.... is it possible to make datatables create the folder '$_SERVER['DOCUMENT_ROOT']'/uploads/ID.EXTN' before uploading the file?

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    One more thing.... is it possible to make datatables create the folder

    No - there is an assumption that the uploads directory will exist if you are pointing uploads to it.

    Going back to your main question - do you know what is causing the file to not load correctly? Are there any errors reported? When you say DataTables crashes, I'm not sure what you mean. Again, are there any errors reported when loading the table in such a state?

    Allan

  • marianidiegomarianidiego Posts: 46Questions: 15Answers: 1

    Usually for slow internet, or unstable wifi....

    No specific error comes, but I haven't looked in the console.

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Yes, that would be the first stopping point. If the connection drops during an upload, I would expect there to be an error shown, but if you can show me how I can reproduce what you are seeing, then I can take a deeper look.

    Allan

  • marianidiegomarianidiego Posts: 46Questions: 15Answers: 1

    I tried, several times, and it did not happen again.

    Anyway created me the line in the "user" table, with NULL in the image value. And had not put anything in the "files" table.

    It was a day with unstable internet. But sorry, I can't reproduce the problem. Thanks anyway.

    I take this opportunity to conratulate with you. I like your application so much!!!

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Thank you very much :)

    Allan

Sign In or Register to comment.