Hello Hemant,

thank you for your help! I had already seen this documentation, but there
is still the problem of inserting files into the room. With the previous
version of OM Gateway & APIs, I call this:

$result = $restService->call($this->getRestUrl("FileService") .
"importFile?SID=" . $this->session_id
. "&externalUserId=" . urlencode($userId)
. "&externalFileId=" . $externalFileId
. "&externalType=" . urlencode($externalType)
. "&room_id=" . urlencode($room_id)
. "&isOwner=" . $isOwner
. "&path=" . urlencode($path)
. "&parentFolderId=" . $parentFolderId
. "&fileSystemName=" . urlencode($fileSystemName));

and everything works smoothly, OM takes the files directly from the
URL specified
in "*path*".

With the new version, this no longer works, and the funcion "*add*" is
described in the documentation as follows:
------------------------------------------------------------------
add

@POST
@Consumes(value="multipart/form-data")
@Path(value="/")
public FileExplorerItemDTO
<http://openmeetings.apache.org/openmeetings-db/apidocs/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.html?is-external=true>
add(@QueryParam(value="sid")
                               String
<http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true>
sid,
                               FileExplorerItemDTO
<http://openmeetings.apache.org/openmeetings-db/apidocs/org/apache/openmeetings/db/dto/file/FileExplorerItemDTO.html?is-external=true>
file,
                              InputStream
<http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true>
stream)
          throws
org.apache.openmeetings.webservice.error.ServiceException
<http://openmeetings.apache.org/openmeetings-db/apidocs/org/apache/openmeetings/webservice.error.ServiceException.html?is-external=true>

to add a folder to the private drive, set parentFileExplorerItemId = 0 and
isOwner to 1/true and externalUserId/externalUserType to a valid user
Parameters:sid - The SID of the User. This SID must be marked as logged in
file - the The file to be addedstream - the The file to be added Returns:-
Object created
------------------------------------------------------------------

How do I pass the FileExplorerItemDTO and, above all, the InputStream
through OmGateway.php or OmRestService,php??

Thank you and let me know!

Alessio




2016-09-19 19:13 GMT+02:00 Coscend@OM <om.insig...@coscend.com>:

> Hello Alessio,
>
> Guide and snippets:  https://github.com/openmeetings/openmeetings-api-
> plugin/wiki
> Moodle plugin:  http://openmeetings.apache.org/MoodlePlugin.html
>
> Thank you.
>
> Sincerely,
>
> Hemant K. Sabat
>
> Coscend Communications Solutions
> Web site: www.Coscend.com
> ------------------------------------------------------------------
> CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail
> Messages from Coscend Communications Solutions' posted at:
> http://www.Coscend.com/Terms_and_Conditions.html
>
>
>
> -----Original Message-----
> From: Alessio Falsetti [mailto:alessio.false...@eng.it]
> Sent: Monday, September 19, 2016 12:08 PM
> To: user@openmeetings.apache.org
> Subject: REST API
>
> Hi,
>
> through the REST API of OpenMeetings (3.1.1), I'm trying to upload files
> into a room.
>
> I'm trying to use the FileWebService API to add the files. Reading the
> documentation I seem to have understood that the function to be used is
> ADD, but until now I have not been successful use it, because I have not
> clear what and how parameters needs to pass to the function.
>
> Where can I find a *working* example in PHP?
> Thanks a lot!
>
> Alessio
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7797 / Virus Database: 4656/13044 - Release Date: 09/19/16
>
>

Reply via email to