files
52 TopicsDisable download but enable printing for excel files
Is it possible to create a permission level that prevents guest users from downloading Excel files while also allowing them to print? I want guest users to be able to print reports from a shared Excel file, but I don't want them to be able to download the file to their devices.413Views2likes4CommentsFeedback (feature request to drag and select photos on IOS)
I am looking to provide feedback (feature request) for the OneDrive IOS application. The feature request is to have the ability to hold my finger down and drag it to multi-select photos quickly (when uploading photos to OneDrive from the phone). Currently, when uploading photos to OneDrive on the iphone, I have to individually tap on each photo icon I want to upload. When uploading hundreds of photos the process is very painful. I tried a work-around using the native IOS "Photos" app. This app allows you to multi-select by dragging your finger. after the photos are selected I can "share" to onedrive. However, for some reason, I can only do this for up to approximately 20-30 photos. If I try to share 100 photos for example, the onedrive app doesn't appear in the share selection menu.4.1KViews2likes3CommentsOneDrive iOS Link to an offline folder
Hello all, i am facing a problem with offline data in the OneDrive iOS App. What i do: I am using a custom App where i want to link to a dedicated offline avaiable library folder in OneDrive. When i create the share link the OneDrive App opens and the library and folder opens. But this only works in online mode. But when i am in offline mode the folder is not found even if it is offline avaiable. At the moment i tried the following links: SharePoint URL/:f:/r/teams/TEAM/folder path Is there a link that points directly to the offline folders ? Thank you.750Views2likes0CommentsOneDrive download issue: 401 Unauthorized
Hello, I'm Nick. Our team built a WordPress plugin written in PHP that integrates OneDrive as a remote storage solution. Recently, some users have reported issues downloading backups from OneDrive. To connect OneDrive, users need to authenticate their accounts. Here are the authorization codes used in the process. Once authentication is complete, the plugin retrieves the following information: access_token, refresh_token, and expires_in. $auth_id = uniqid('wpvivid-auth-'); $url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' . '?client_id=' . urlencode('37668be9-b55f-458f-b6a3-97e6f8aa10c9') . '&scope=' . urlencode('offline_access files.readwrite') . '&response_type=code' . '&redirect_uri=' . urlencode('https://auth.wpvivid.com/onedrive_v2/') . '&state=' . urlencode(apply_filters('wpvivid_get_admin_url', '') . 'admin.php?page='.sprintf('%s-remote', apply_filters('wpvivid_white_label_slug', 'wpvivid')).'&action=wpvivid_pro_one_drive_finish_auth&sub_page=cloud_storage_onedrive&auth_id='.$auth_id) . '&display=popup' . '&locale=en'; header('Location: ' . esc_url_raw($url)); Fortunately, uploading to OneDrive seems to be functioning properly. We followed the official OneDrive documentation below to ensure a smooth upload process. https://learn.microsoft.com/en-us/answers/questions/1664570/download-issue-401-unauthorized According to the doc, create an upload session to upload files to OnDrive. Here are the code snippets: $url='https://graph.microsoft.com/v1.0/me/drive/root:/'.$path.':/createUploadSession'; $args['method']='POST'; $args['headers']=array( 'Authorization' => 'bearer '.$this->options['token']['access_token'],'content-type' => 'application/json'); if(!is_null($body)) { $args['body']=$body; } $args['timeout']=30; $response=wp_remote_post($url,$args); The session URL returned in the response: https://learn.microsoft.com/en-us/answers/questions/1664570/download-issue-401-unauthorized Utilize the session URL provided in the response to upload files: $curl = curl_init(); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($curl, CURLOPT_TIMEOUT, 60); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $upload_size=min($upload_size,$file_size-$uploaded); if ($uploaded) fseek($file_handle, $uploaded); $headers = array( "Content-Length: $upload_size", "Content-Range: bytes $uploaded-$upload_end/".$file_size, ); $options = array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => $headers, CURLOPT_PUT => true, CURLOPT_INFILE => $file_handle, CURLOPT_INFILESIZE => $upload_size, CURLOPT_RETURNTRANSFER=>true, ); curl_setopt_array($curl, $options); $response=curl_exec($curl); Continue uploading file chunks using the 'nextExpectedRanges' provided in the response until the entire file is uploaded. We attempted to download the backup from OneDrive following the official documentation (https://learn.microsoft.com/en-us/answers/questions/1664570/download-issue-401-unauthorized). Unfortunately, the download process failed. Before proceeding, check if the file exists. Here's the code snippet for this step: $url='https://graph.microsoft.com/v1.0/me/drive/root:/'.$folder.'/'.$file.'?$select=id,name,size'; if(empty($except_code)) { $except_code=array(200,201,202,204,206); } $args['timeout']=$timeout; $args['headers']['Authorization']= 'bearer '.$this->options['token']['access_token']; $response=wp_remote_get($url,$args); The '$url' in the code snippet is https://graph.microsoft.com/v1.0/me/drive/root:/wpvividbackuppro/staging_untetheredbytinapayne_com/staging.untetheredbytinapayne.com_wpvivid-6639c8da6e73b_2024-05-07-01-23_backup_all.zip?$select=id,name,size '$args' parameter is {"timeout":30,"headers":{"Authorization":"bearer EwBoA8l6BAAUbDba3x2OMJElkF7gJ4z/VbCPEz0AAWP+nK+LDe9/gYinyOb9qXXwzcaMDpHlUCFgxpDiym9czdVDbAArgwmsGI+c+DqAyzgGEBf/QZ1hVSS/hFsPELNYdMwD8orcS+iadcYsRyOjIYA48NK6RVifg5VsQwLQvFOP/jO9Ho0mw17UoRrylJwNZ3uglKr4wL22Z1twPERWaBpdxaz1z2GHfZU+00HIL+QycgVLbQ+wvOrn6SZUVCAWQK+mPTy9hSFyZoitS1lGmUsKZ6D7ml9/5/FyVvVtXHt5nIGi9e2cdsRVy5XiXtbAuGz871TvBtCdgKE0n5Lj2JN/lKR/bEe4CjhkuttbrpBTP55l4ERb0/Ko5p8Od5MDZgAACH7rqvHkxM3OOAKgg4cMahuo1N0WkRW15qY1PgclkSaSBE6NEgecql5Koz+iUhBh457B7/dpyxncun89KFIoOZpxZn8WPY3epTqfFRLu1iSx1BgAB5sNqXC3Iqpsv5VpcHiySTwlctJHbbnHoEl8WVDRQgWxyjgQyXgEFV1u1kwvpywLZH6KRc++EV0/Axg9XnrW01xEI/0emiFndAmnSYnQ0meAjIXC3LDym+2KNUd05xF9dAeuW5lCJ+/tlpkPfcOY0uJhOMFHDaNCw7H6r/MhQGhHQVZeUm1NUCDi94RZ7xhNB0rDuI0PTKEWFcfR2TGQ/y/m+mYKikx0vsp/kFNp2QtIIbZL+JfvhB1b9n3ZlLT2j3fvZ6UNp5gODRzXLYeq8Wk3q+rFsJ4gG+2S3wqkjwyoB7muUbSWpHWXaFtVLu8RtTuoiu2YykfBy5M9+R0cCbeQ45P2ipD+ZK5WbIY0eUrRY+cPJ/K17UxcLBBTeCftJRW9KgYP1sFtfda1SXOm8PC5JW4YTP/AWcRmvqAIKaXJPKn92ZfBTlWQxxQNRxpJf8enPhl9p8+dj/sJx7M3vcCIUfXKtWt6LJld6ywI13oiSj0NZq3fPARJlrQvja5Z4Td55iW+oHIBKgOMzPCzxKXbSQ2O5mc3jYcY9iOewvehRF/fPS93aWyePaxApiWQ0bP13PqNTOBLWtzse1r1xQymF4B7FltTBrjVcV9PduAMe3u/bSewaQEf4Xgldv+KavdS8mDd+0ctRhV554YCcwI="}} The request response is {"headers":{},"body":"{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('aa%40alphalegacyfund.org')/drive/root(id,name,size)/$entity","@odata.etag":"\"{8BB33EFA-F1B5-4D6E-A101-03F6F9173B8B},3\"","id":"9FC61E00E002D0E3!s8bb33efaf1b54d6ea10103f6f9173b8b","name":"staging.untetheredbytinapayne.com_wpvivid-6639c8da6e73b_2024-05-07-01-23_backup_all.zip","size":78335490}","response":{"code":200,"message":"OK"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} After confirming the file exisitance, start downloading files. Here are the codes snippet: $url='https://graph.microsoft.com/v1.0/me/drive/root:/'.$path.'/'.$download_info['file_name'].':/content'; $headers['Range']="bytes=$downloaded_start-$downloaded_end"; $response=$this->remote_get($url,$headers,false,30); The '$url' in the code snippet represent: https://graph.microsoft.com/v1.0/me/drive/root:/wpvividbackuppro/staging_untetheredbytinapayne_com/staging.untetheredbytinapayne.com_wpvivid-6639c8da6e73b_2024-05-07-01-23_backup_all.zip:/content $args parameter is {"timeout":30,"headers":{"Authorization":"bearer EwBoA8l6BAAUbDba3x2OMJElkF7gJ4z/VbCPEz0AAWP+nK+LDe9/gYinyOb9qXXwzcaMDpHlUCFgxpDiym9czdVDbAArgwmsGI+c+DqAyzgGEBf/QZ1hVSS/hFsPELNYdMwD8orcS+iadcYsRyOjIYA48NK6RVifg5VsQwLQvFOP/jO9Ho0mw17UoRrylJwNZ3uglKr4wL22Z1twPERWaBpdxaz1z2GHfZU+00HIL+QycgVLbQ+wvOrn6SZUVCAWQK+mPTy9hSFyZoitS1lGmUsKZ6D7ml9/5/FyVvVtXHt5nIGi9e2cdsRVy5XiXtbAuGz871TvBtCdgKE0n5Lj2JN/lKR/bEe4CjhkuttbrpBTP55l4ERb0/Ko5p8Od5MDZgAACH7rqvHkxM3OOAKgg4cMahuo1N0WkRW15qY1PgclkSaSBE6NEgecql5Koz+iUhBh457B7/dpyxncun89KFIoOZpxZn8WPY3epTqfFRLu1iSx1BgAB5sNqXC3Iqpsv5VpcHiySTwlctJHbbnHoEl8WVDRQgWxyjgQyXgEFV1u1kwvpywLZH6KRc++EV0/Axg9XnrW01xEI/0emiFndAmnSYnQ0meAjIXC3LDym+2KNUd05xF9dAeuW5lCJ+/tlpkPfcOY0uJhOMFHDaNCw7H6r/MhQGhHQVZeUm1NUCDi94RZ7xhNB0rDuI0PTKEWFcfR2TGQ/y/m+mYKikx0vsp/kFNp2QtIIbZL+JfvhB1b9n3ZlLT2j3fvZ6UNp5gODRzXLYeq8Wk3q+rFsJ4gG+2S3wqkjwyoB7muUbSWpHWXaFtVLu8RtTuoiu2YykfBy5M9+R0cCbeQ45P2ipD+ZK5WbIY0eUrRY+cPJ/K17UxcLBBTeCftJRW9KgYP1sFtfda1SXOm8PC5JW4YTP/AWcRmvqAIKaXJPKn92ZfBTlWQxxQNRxpJf8enPhl9p8+dj/sJx7M3vcCIUfXKtWt6LJld6ywI13oiSj0NZq3fPARJlrQvja5Z4Td55iW+oHIBKgOMzPCzxKXbSQ2O5mc3jYcY9iOewvehRF/fPS93aWyePaxApiWQ0bP13PqNTOBLWtzse1r1xQymF4B7FltTBrjVcV9PduAMe3u/bSewaQEf4Xgldv+KavdS8mDd+0ctRhV554YCcwI=","Range":"bytes=0-2097151"}} The request response is 401 Unauthorized {"headers":{},"body":"{"error":{"code":"unauthenticated","message":"Unauthenticated"}}","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Our plugin automatically checks for token expiration in every request. If a token is expired, it's refreshed to ensure uninterrupted service. We've carefully followed the OneDrive Learn Documentation for both uploading and downloading files in our plugin. However, we're consistently encountering a 401 Unauthorized error during the download process. Any insights or suggestions on resolving this issue would be greatly appreciated.1.7KViews1like1CommentError while downloading pdf from Onedrive through get content api
Hello, I am getting java Unknown host exception: my.microsoftpersonalcontent.com : Name does not found error. My code was running fine but from last 10 days i was facing this issue , also i have not changed anything in my code or url given by Onedrive documentation.368Views1like0CommentsMultiple driveid for a single account. Accessible from Main account
Hi, having multiple drive id for a single account. I can access 2 drives through a shortcut (see screenshot). I have an error when asking for details. What could have cause the existence of those Drives? How can I get rid of them? 1 / OneDrive (personal) \ (b!R-MBeVgUGEWE1REDACTED5NqSlsno-R1_R1NYJqraPPQoMmAL1d872o) 2 / OneDrive (personal) \ (b!R-MBeVgUGEWEREDACTEDstH7fZ5NqSlsno-R1_Rl7ezg_nJzSZ_M4RrKjA-k) 3 / OneDrive (personal) \ (50c37REDACTING32c) Thank you250Views1like0CommentsBase URL used for Multi Tenants
Hello, I want users to select files from their personal and company drive but it requires a base url which is used to authenticate the user into the drive but the https://github.com/OneDrive/samples/tree/master/samples/file-picking and the https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/?view=odsp-graph-online don't have any indication of where to get a dynamic base url or the base url to use for the multiple tenants. Right now it only works for users in my organisation but I need it for users. Edit: I am using the v8 file picker Thank you3.8KViews1like5CommentsNo option for restoring files from Bin
Hi, so I have accidentally removed the OneDrive folder on my PC, therefore went to the website and to the Bin to restore, however I do not have the restore option when right-clicking the files. Only Remove. I did have my account frozen and therefore have purchased additional data, it says 0/100GB used yet still claims y account is frozen, is that why I cannot Retore my files? I tried the chatbot, no help on the matter, can't seem to be able to find a contact to technical support, all the clicks just send me away in the wrong places. I have literally lost most of my files as my Desktop and Documents folders are now gone. Please help.847Views1like1CommentIs it possible to upload a file to One Drive if I don't know its size ahead of time?
Our application will frequently have the need to upload a stream of bytes for a file to One Drive, and we won't know the size of the file ahead of time. I am aware of the documentation for One Drive https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online#upload-bytes-to-the-upload-session that clearly indicates it is not possible, but I am really hoping if there's a way to work around this. Important: Your app must ensure the total file size specified in the Content-Range header is the same for all requests. If a byte range declares a different file size, the request will fail. Or is there any work being done to enhance the REST API so we can do this? Google Drive uses a very similar method for uploading large files, but supports unknown file sizes by doing this with the Content-Range header during chunk transfer 0-127/* and then on the final chunk we can specify the known size 128-255/256. I'm just really surprised this is not supported.650Views1like1CommentRecuperar Archivos de one drive
Buenas noches, quisiera saber como recuperar este tipo de archivos Les cuento como sucedio, bueno un dia estaba molesto y borre todos mis archivos sin darme cuenta que tenia archivos muy importante, por lo cual despues de un mes lo quise recuperar. El problema se dio que te dan un plazo solo de hasta un mes y cuando estaba a tiempo me pedian un codigo el cual no tenia y para poder obtenerlo tenia que esperar otro mes, ahora no me aparace en el lugar para recuperar los archivos Solo me quedan este tipo de archivos que guarde ni idea como, pero no los puedo abrir Quisiera que me puedan ayudar Son muy importantees para mi 😞523Views1like0Comments