Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Using none standard file extensions e.g. '*.bam' #1841

Closed
2 of 6 tasks
keiranmraine opened this issue May 22, 2017 · 7 comments
Closed
2 of 6 tasks

Using none standard file extensions e.g. '*.bam' #1841

keiranmraine opened this issue May 22, 2017 · 7 comments

Comments

@keiranmraine
Copy link

Type of issue

  • Bug report
  • Feature request
  • Support request

Uploader type

  • Traditional
  • S3 (Ceph)
  • Azure
Support Request

Fine Uploader version

5.14.2

Question

We are attempting to use the tool to upload bioinformatics file types such as .bam and the submission fails indicating:

Received response status 403...Policy missing condition: Content-Type

I understand that is due to an inability to identify the mime-type, but can't see where I can setup a mapping for .bam.

@rnicholus
Copy link
Member

code please

@keiranmraine
Copy link
Author

I have managed to isolate that this is only a problem for files that don't need to be chunked.

e.g.
1mb.rnd fails
50md.rnd works

Just the standard S3 example + php server with this as the in html config:

var uploader = new qq.s3.FineUploader({
            debug: true,
            element: document.getElementById('fine-uploader'),
            cors: {
              expected: true
            },
            objectProperties: {
              bucket: 'test',
              host: 'our.s3.url'
            },
            request: {
                endpoint: 'https://test.our.s3.url',
                accessKey: 'XXXXXXXX'
            },
            signature: {
                endpoint: "/vendor/fineuploader/php-s3-server/endpoint-cors.php"
            },
            uploadSuccess: {
                endpoint: "/vendor/fineuploader/php-s3-server/endpoint-cors.php?success"
            },
            iframeSupport: {
                localBlankPagePath: "success.html"
            },
            chunking: {
                enabled: true,
                concurrent: {
                    enabled: true
                }
            },
            resume: {
                enabled: true
            },
            retry: {
                enableAuto: true,
                showButton: true
            },
            deleteFile: {
                enabled: true,
                endpoint: "/vendor/fineuploader/php-s3-server/endpoint-cors.php"
            }
        });

And minimal cors

## CONFIGURE CORS ON BUCKET:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <ExposeHeader>ETag</ExposeHeader>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

@rnicholus
Copy link
Member

I honestly can't remember why we send this policy condition. May be best to just turn it off? I can't remember the logic offhand.

@keiranmraine
Copy link
Author

@rnicholus is this a configurable option or some code to comment out?

@rnicholus
Copy link
Member

probably a code change - haven't looked yet

@davebiffuk
Copy link

#1846 fixes this in my limited testing by setting a default content-type ("application/octet-stream") if the browser can't figure out a specific content-type. (I work with Keiran.)

@keiranmraine
Copy link
Author

As @davebiffuk has identified this to be a bug in ceph and tracking the problem in #1846 I'll close this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants