Owncloud file management externally

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Owncloud file management externally

Scion Savostin

What we have capabilities to manage file externally?

For now I create my own external REST app that using web dav calls to upload files, delete files, create folders and so on. I worry about, do I need to use web dav locking/unlocking futures? Or this is server side(owncloud) job?

Secondly, is this only one method to achieve point of this post using web dav or maybe I could create some rest owncloud app that take care of external file operations? But I didnt find any examples except out of the box "files app" :(

Please point me to the right direction, which method to use? (now my rest implementation works pretty well, i am using just one user credentials, but i am worry about locks/unlocks)

Thanks


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Owncloud file management externally

Vincent Petry
Hello,

The official way to manage files externally is to use the Webdav
interface. Please note that it doesn't support the Webdav LOCK/UNLOCK
verbs, so you don't need to worry about these. Simply use the usual
verbs like GET, PUT, MKCOL, PROPFIND, PROPPATCH, etc.

If you want an example on how to do it you can check pyocclient:
https://github.com/owncloud/pyocclient

It's a wrapper (or SDK) for the different ownCloud APIs, Webdav but also
some other APIs like sharing.

Hope this helps,

Cheers,

Vincent

On 13.07.2016 15:32, Scion Savostin wrote:

>
> What we have capabilities to manage file externally?
>
> For now I create my own external REST app that using web dav calls to upload files, delete files, create folders and so on. I worry about, do I need to use web dav locking/unlocking futures? Or this is server side(owncloud) job?
>
> Secondly, is this only one method to achieve point of this post using web dav or maybe I could create some rest owncloud app that take care of external file operations? But I didnt find any examples except out of the box "files app"
>
> Please point me to the right direction, which method to use? (now my rest implementation works pretty well, i am using just one user credentials, but i am worry about locks/unlocks)
>
> Thanks
>
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/devel
>


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Owncloud file management externally

Vincent Petry
Hi,

Note: please answer to the mailing list.

If you create an ownCloud app that lives inside the "apps" folder, you
can also use the Webdav APIs if you like. Or you could use the PHP's
public APIs to manipulate files and folders. In PHP you can do
\OC::$server->getUserFolder($userId) and then you'll get a Folder
object: https://doc.owncloud.org/api/classes/OCP.Files.Folder.html

Regarding your second question, it is not possible to disable the files
web UI unfortunately. What you could do is block the login page with
your firewall to prevent users to use the web UI altogether and only
rely on APIs.

Cheers,

Vincent

On 13.07.2016 16:00, Scion Savostin wrote:

>
> Hi. Yeah, I already saw python example, many thanks for it.
>
> So its means that I couldnt create Owncloud rest app inside apps folder that takes
> rest requests and manipulates with files and folders?
>
>
> One more point, is there any possibility to disallow using web browser interface, cause I want use for file manipulation only with my own
> REST app. (To be clear I mean that now I have my own REST application - NOT app in owncloud app folders)
>
> Thanks Среда, 13 июля 2016, 16:49 +03:00 от Vincent Petry <[hidden email]>:
>>
>> Hello,
>>
>> The official way to manage files externally is to use the Webdav
>> interface. Please note that it doesn't support the Webdav LOCK/UNLOCK
>> verbs, so you don't need to worry about these. Simply use the usual
>> verbs like GET, PUT, MKCOL, PROPFIND, PROPPATCH, etc.
>>
>> If you want an example on how to do it you can check pyocclient:
>> https://github.com/owncloud/pyocclient
>>
>> It's a wrapper (or SDK) for the different ownCloud APIs, Webdav but also
>> some other APIs like sharing.
>>
>> Hope this helps,
>>
>> Cheers,
>>
>> Vincent
>>
>> On 13.07.2016 15:32, Scion Savostin wrote:
>>>
>>> What we have capabilities to manage file externally?
>>>
>>> For now I create my own external REST app that using web dav calls to upload files, delete files, create folders and so on. I worry about, do I need to use web dav locking/unlocking futures? Or this is server side(owncloud) job?
>>>
>>> Secondly, is this only one method to achieve point of this post using web dav or maybe I could create some rest owncloud app that take care of external file operations? But I didnt find any examples except out of the box "files app"
>>>
>>> Please point me to the right direction, which method to use? (now my rest implementation works pretty well, i am using just one user credentials, but i am worry about locks/unlocks)
>>>
>>> Thanks
>>>
>>>
>>>
>>> _______________________________________________
>>> Devel mailing list
>>>  [hidden email]
>>>  http://mailman.owncloud.org/mailman/listinfo/devel
>>>
>>
>>
>


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel

signature.asc (188 bytes) Download Attachment