Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

try to copy the "upload" function to AIMS2013

2 REPLIES 2
Reply
Message 1 of 3
swimming123
615 Views, 2 Replies

try to copy the "upload" function to AIMS2013

When I try to copy and add the "upload" in Redline function, I got this error "The specified file was not found:" Anyone has suggestion?

2 REPLIES 2
Message 2 of 3
jackie.ng
in reply to: swimming123

If you set display_errors = On in your php.ini you should get much more "noisier" errors in the Redline widget giving you something more to work with.

 

- Jackie

Message 3 of 3
swimming123
in reply to: jackie.ng

Thank you Jackie. What I want to do is steal your PHP code and make a function only download/upload kml/kmz file from map. PHP is so different with ASP.NET, thank you for help me.

 

I turned display_errors = On, still get same error message. In my laptop I copied your code, it works fine; but I copied to Server, it gives me this error "The Specified file was not found:" So I added one line code in uploadmarkup.php file at line 54 (before "return true;") in the function "CheckFileName()":  alert(document.getElementById("uploadFile").value);

 

In my laptop, it always display "C:\fakepath\test.sdf"; the path doesn't change with the file location change;

In the Server, it shows the direct path, like "C:\Users\Desktop\test.sdf" , or "C:\Users\download\test.sdf"; the path changes;

 

For fireFox, both display only the file name without path.

 
I  print (GetLocalizationPath()), both got this values: "C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\fusion\layers\MapGuide\php\../../../text/ "

So I think the reason maybe the path. Then I added one line in function UploadMarkup() from markupmanager.php(about line490):

    print($_FILES["UPLOADFILE"]["name"]);

 

laptop shows     "C:\windows\Temp\phpEDFF.temp" or "C:\windows\Temp\php7C5A.temp"; it looks created a temp file in temp folder; I can found these temp files.

Server shows     "test.sdf" which is the exact name of the file that I want to upload; stil in the server it also try to create a temp file like php55DD.tmp, phpDF93, but they are all empty

 

Could you help me to point the next step that I can do to fix this porblem?

 

Another issue is the labels not show, probably due to soem variables cannot pass or exist, I have to hard code it to display, for example: in markupmain.php, I changed line 295 to "<input class="Ctrl" type="button" id="uploadBtn" onClick="SubmitCommand(CMD_UPLOAD)" value="Upload" style="width:85px">", otherwise "Upload" doesn't display enev I copied all the dependency files (under .../layers/MapGuide/php: Common.php, Constants.php, Utilities.php). Thank you very much.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report