Can't get File-Upload to work

QuestionsCan't get File-Upload to work
Doug asked 10 years ago

I have purchased the premium version today and simply can't get the demo "File_update.php" to work at all. First problem: the grid shows with broken image links. Second problem: The Edit and Add forms display without an upload button (they are both simple text boxes).

One contains "Invoice with total 1000.00" and the other "href="/phpgridorg/demos/editing//Invoice with total 1000.00" target="_blank"><img height="100" src="/phpgridorg/demos/editing//Invoice with total 1000.00">".

This is not surprising because the virtual column "logo" points at the column "note" and the data for that field contains the data above.

I also don't see how "$col["upload_dir"] = "temp";" makes any sense.

Does anyone know how to make this sample work?

5 Answers
Abu Ghufran answered 10 years ago

Hello Doug,

The upload_dir is the path where the uploaded files will be stored on server.
It is relative to the grid code file.

In example, the note column is used for attachment. It will show the desired image, when you edit this row and upload some image with that record.

In demo, It works with 2 columns. First column is set to upload the file. It is hidden in listing.
Second column is used to show download link of uploaded file.

Doug answered 10 years ago

Abu,

Thanks for your response. You have not addressed why I would have no upload button on the edit form. I am using the unmodified example code with your sample database. I assume from your reply that there should be a folder "temp" in the folder that phpgrid.php is in. Correct? I have added temp folders everywhere but can't make the sample code work.

Doug

Abu Ghufran answered 10 years ago

Which OS and Browser are you using. I'll try to regenerate the case.
Currently, without changing demo it should show like …

http://tinyurl.com/ln3lmvj

For upload directory, you should not be worried as it is created if does not exist. Core issues seems to be different display now.
Awaiting your update …

Doug answered 10 years ago

That picture is exactly what I would expect to see but on my system there is no upload button. Only a text field where is should be.
My setup:
Server: Win 7 running XAMPP
Client: I have tested with latest versions of Chrome and IE from multiple different systems (Win8, Win 7 and locally on the server) and get the same effect.
I am starting to suspect XAMPP and some file upload setting ……

Abu Ghufran answered 10 years ago

I've emailed you latest build, which should resolve this issue.
Problem was with the behavior of uniqid() php function.

Your Answer

20 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?