Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When sharing a file mime-type field is set to application/octet-stream #1271

Closed
individual-it opened this issue Jun 25, 2020 · 2 comments
Closed
Labels

Comments

@individual-it
Copy link
Member

  1. setup OCIS with EOS as described in https://github.com/owncloud-docker/compose-playground/tree/master/examples/eos-compose-acceptance-tests
  2. load test users ldapadd -x -D "cn=admin,dc=owncloud,dc=com" -w admin -H ldap://localhost -f ./config/example-ldap-users-groups.ldif
  3. upload a file curl -k -u user1:1234 -X PUT https://localhost:9200/remote.php/dav/files/user1/file.txt -d "123" -v
  4. share the file: curl -u user1:1234 -X POST "http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares" -H "OCS_APIREQUEST: true" -d path=file.txt -d shareType=0 -d shareWith=user0 | xmllint --format -

Result:

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <id>f0641e4b-851f-4117-8105-f06e1eafee36</id>
    <share_type>0</share_type>
    <uid_owner>user1</uid_owner>
    <displayname_owner/>
    <permissions>19</permissions>
    <stime>1593086158</stime>
    <parent/>
    <expiration/>
    <token/>
    <uid_file_owner>user1</uid_file_owner>
    <displayname_file_owner/>
    <additional_info_owner/>
    <additional_info_file_owner/>
    <state>0</state>
    <path>/file.txt</path>
    <item_type>file</item_type>
    <mimetype>application/octet-stream</mimetype>
    <storage_id>1284d238-aa92-42ce-bdc4-0b0000009158</storage_id>
    <storage>0</storage>
    <item_source>213406187520</item_source>
    <file_source>213406187520</file_source>
    <file_parent/>
    <file_target>/file.txt</file_target>
    <share_with>user0</share_with>
    <share_with_additional_info/>
    <mail_send/>
  </data>
</ocs>

Might not be limited to EOS, need to be retested with OC storage

@PVince81
Copy link
Contributor

need to check if the ocis container used for testing contains the "mailcap" package which delivers the system's mime type list, like https://github.com/owncloud/ocis-reva/pull/221/files#diff-74dc60589e0610c07e491b31f8693b2bR72

@butonic butonic transferred this issue from owncloud/ocis-reva Jan 18, 2021
@refs refs changed the title [EOS] when sharing a file mime-type field is set to application/octet-stream When sharing a file mime-type field is set to application/octet-stream Jan 18, 2021
@settings settings bot removed the Storage:EOS label Jan 29, 2021
@settings settings bot removed the p3-medium label Apr 7, 2021
@kobergj
Copy link
Collaborator

kobergj commented Jun 4, 2024

Closing as this is too old.

@kobergj kobergj closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants