This topic is locked
[SOLVED]

Changing upload from OneDrive back to Local Storage

11/30/2024 11:47:05 PM
PHPRunner General questions
1NET author

My client has asked to no longer upload files to the OneDrive storage as this makes the app slow to load list pages with uploaded images being displayed in small gallery format.

I went through all picture & document upload field options in each onedrive configured page and changed it back to file, selected the directory and save.

Uploaded this to the live client area on our server and its works perfectly well.

However if i use my local Webserver (which I use successfully for multiple apps i've developed) i keep getting a redirected onedrive error page

img alt

Address in browser:
https://login.live.com/oauth20_authorize.srf?client_id=46659836-84fa-433e-b8e6-04b152b4e43e&scope=files.readwrite+offline_access&redirect_uri=http%3a%2f%2f127.0.0.1%2fbeapp%2foauthcallback.php&response_type=code&state=c2vkmx17bhuieu1i01eqhlg1mnd224&uaid=c9eb3dc00ac54ac0bd721e771ef5362e&msproxy=1&issuer=mso&tenant=consumers&ui_locales=en-US&epct=PAQABDgEAAADW6jl31mB3T7ugrWTT8pFetxFCPxar2dhyq9hhOcxKel9L6BbJSBQzC5W0zzJjOyVLtCBDN3MiGbETCuO1gfkFyRZtIusTwyRITiWBgDedmi_0eTTPOWVrpsmxy-VTccwxc_1idcw-xjo8PNc93yTwldjuFKhNlzRWkDPDw761Reexmv2-1SQNIC0PLgumviCpSYYghDtbkizrAI8Bvoo6y_rvmA3kDmVq4ggYKQaM0iAA&jshs=0#

I'm gathering PhpRunner must hard code a redirect to onedrive once used. I cannot seem to "UN-ONEDRIVE" my app for local testing.
Has anyone else experienced this?

D
DealerModulesDevClub member 12/1/2024

Hi,
I had a similar problem and found a video on YouTube that helped. For me it was in the settings of onedrive.
Here is the video that help me. It was unchecking "Turn On All Connected Experiences".

https://www.youtube.com/watch?v=JZExGUNQeK4

Hope this helps you.

Paul

1NET author 12/1/2024

Hi Paul, Thanks for your input, however the issue im having is completely independent of any microsoft app.

onedrive was setup as a location to save uploaded images and documents within the phprunner app
I have simpoly changed it back to a local folder to save all images and documents.
I have removed all traces of onedrive from the upload settings in each field.
However when I login to the app - Hosted from my local instance of XAMPP i am automatically re-directed to a onedrive page that errors.
there should be no re-direct at all since the config for onedrive has been removed.

Somewhere inside the "general / settings files" phprunner has hard coded the redirect to onedrive services online.

1NET author 12/1/2024

I have worked it out myself
to make this easier download a text editor such as Notepad++

"HOW TO UN-ONEDRIVE A PHPRUNNER PROJECT"

1 Change all image / doc upload field settings to your new settings ie.
Save files to: "Disk"
Upload Folder: files/images

save your project and exit PHPRunner

goto the phprunner project folder on your local C drive, my instance was located at
C:\Projects\MyProject\
right click on MyProject.phpr file
select edit with Notepad++

find....
[Ctrl] + F

Find what: OneDrive
Click Button Find All in Current Document

you will see a window showing every entry for OneDrive in the project file, ie.

> Remove every result that has data between the <> </> tags

This has no settings <m_strOneDrivePath></m_strOneDrivePath> and will stop onedrive
These setting will automatically require you to login to onedrive online

Line 95553: <m_strOneDrivePath>**BE_APP/PICS**</m_strOneDrivePath>
Line 95784: <m_strOneDrivePath>**BE_APP/PICS**</m_strOneDrivePath>
Line 96751: <m_strOneDrivePath></m_strOneDrivePath>
Line 96976: <m_strOneDrivePath></m_strOneDrivePath>
Line 97206: <m_strOneDrivePath>**BE_APP/GENERAL_MAINTENANCE**</m_strOneDrivePath>
Line 97437: <m_strOneDrivePath></m_strOneDrivePath>
Line 97662: <m_strOneDrivePath></m_strOneDrivePath>
Line 98239: <m_strOneDrivePath></m_strOneDrivePath>
Line 98464: <m_strOneDrivePath></m_strOneDrivePath>
Line 98694: <m_strOneDrivePath>**BE_APP/GENERAL_MAINTENANCE**</m_strOneDrivePath>
Line 150776: <filename>C:\xampp\htdocs\MyProject\classes\filesystem\onedrive.php</filename>
Line 150777: <source>C:\Program Files\PHPRunner10.91\source\classes\filesystem\onedrive.php</source>
Line 155187: <m_strOneDriveClientID>**422346659836-84fa-433e-b8e6-04b152b4e43e**</m_strOneDriveClientID>
Line 155188: <m_strOneDriveClientSecret>**.13490h8Q~UWqauF5SmTfDz~TwBAHHyO2adjVEIDvdxd**</m_strOneDriveClientSecret>
Line 155189: <m_strOneDriveDrive>**6047556AC9A5835F**</m_strOneDriveDrive>

> Remove every result that has data between the <> </> tags

Save your phpr file
Re-open your project
Re-export and its done.