Infrastructure Map Server Developer

Infrastructure Map Server Developer

Valued Contributor
Posts: 87
Registered: ‎04-12-2012
Message 1 of 3 (385 Views)

try to copy the "upload" function to AIMS2013

385 Views, 2 Replies
07-15-2013 09:09 AM

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?

Valued Mentor
Posts: 282
Registered: ‎10-06-2008
Message 2 of 3 (376 Views)

Re: try to copy the "upload" function to AIMS2013

07-15-2013 06:10 PM 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

Valued Contributor
Posts: 87
Registered: ‎04-12-2012
Message 3 of 3 (355 Views)

Re: try to copy the "upload" function to AIMS2013

07-16-2013 02:19 PM in reply to:

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):



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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.