Forum Index \ DriveHQ Customer Support Forum \
Read/Reply : 22595/1
  • qatest1234
  • (1 posts)

Hi DriveHQ,

I'm the WebDAV developer who is interested about DriveHQ!
Recently I'd like to write the code to operate DriveHQ storage.

It' great that I can leverage Python's requests to operate DriveHQ storage.
For example, I can use WebDAV API to interact with DriveHQ such as PUT to upload a file, GET to download a file, and MKCOL to create a folder, etc.

However, I have a question that when I use COPY to copy a file in the same folder, I get 403 error! If I use COPY to copy a file in the different folder, it works!

 

(1) Copy to the same folder

input url: https://dhqidpi45y1rxclpikdpvqc.webdav.drivehq.com:443/a.txt
input method: COPY
input header: {'headers': {'Destination': 'https://dhqidpi45y1rxclpikdpvqc.webdav.drivehq.com:443/b.txt', 'Overwrite': 'T'}}

output code: 403
output header: {'Content-Length': '0', 'X-AspNet-Version': '4.0.30319', 'Expires': '0', 'X-Powered-By': 'ASP.NET', 'Server': 'Microsoft-IIS/8.5', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache, no-store, must-revalidate,no-cache', 'Date': 'Tue, 08 Mar 2016 08:50:54 GMT', 'Content-Type': 'text/html'}


(2
) Copy to the different folder

input url: https://dhqidpi45y1rxclpikdpvqc.webdav.drivehq.com:443/a.txt
input method: COPY
input header: {'headers': {'Destination': 'https://dhqidpi45y1rxclpikdpvqc.webdav.drivehq.com:443/tmp/b.txt', 'Overwrite': 'T'}}

output code: 201
output header: {'Content-Length': '0', 'X-AspNet-Version': '4.0.30319', 'Expires': '0', 'X-Powered-By': 'ASP.NET', 'Server': 'Microsoft-IIS/8.5', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Date': 'Tue, 08 Mar 2016 08:55:27 GMT', 'Content-Type': 'text/html'}

 

May I know why it will be forbidden when I use COPY a file to other file in the same path?
Will DriveHQ support same path COPY for WebDAV operation in the future?

Many thanks!
 


3/8/2016 1:03:04 AM

  • DriveHQSupport_
  • (650 posts)
Subject: Re:Get 403 when using WebDAV COPY API for copying files in the same folder

 Thank you for reporting the problem. It seems to be a compatibility bug. Our engineers believe they have fixed it now. Please try again and let us know if it is working. 


Reply
3/9/2016 1:52:13 PM

Quickly Reply

Please logon and reply, Not DriveHQ Member?


Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003