It's impossible to upload file named `New_Issue_–_YouTrack.png` (#350)
wojciech.kapcia@tigase.net opened 4 years ago
Affected versions
5.0

For some reason it's impossible to upload file named New_Issue_–_YouTrack.png.

BeagleIM only gives enigmatic error:

There is nothing relevant in XML logs:

<!--   2021-02-01T20:45:48Z   <<<<   -->
<iq to='wojtek@tigase.org/1553744829-tigase-2' from='upload.tigase.org' xmlns='jabber:client' id='3C857427-B2B4-4B52-9D69-4A701BE1F232' type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity category='store' type='file' name='HTTP File Upload component'/>
<feature var='http://jabber.org/protocol/disco#items'/>
<feature var='urn:xmpp:http:upload:0'/>
<feature var='http://jabber.org/protocol/disco#info'/>
<x type='result' xmlns='jabber:x:data'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/network/serverinfo</value>
</field>
<field var='abuse-addresses' type='text-multi'>
<value>mailto:support@tigase.net</value>
<value>xmpp:tigase@muc.tigase.org</value>
<value>https://tigase.tech/projects/tigase-xmpp-installations</value>
</field>
</x>
<x type='result' xmlns='jabber:x:data'>
<field var='FORM_TYPE'>
<value>urn:xmpp:http:upload:0</value>
</field>
<field var='max-file-size'>
<value>20971520</value>
</field>
</x>
</query>
</iq>

<!--   2021-02-01T20:45:49Z   >>>>   -->
<iq to='upload.tigase.org' type='get' id='B2522038-049C-4F5C-9301-DE1C86436E76'>
<request filename='New_Issue_–_YouTrack.png' xmlns='urn:xmpp:http:upload:0' size='37820' content-type='image/jpeg'/>
</iq>

<!--   2021-02-01T20:45:49Z   <<<<   -->
<iq to='wojtek@tigase.org/1553744829-tigase-2' from='upload.tigase.org' xmlns='jabber:client' id='B2522038-049C-4F5C-9301-DE1C86436E76' type='result'>
<slot xmlns='urn:xmpp:http:upload:0'>
<put url='https://tigase.cloud:443/upload/wojtek@tigase.org/19807e3b-c0c0-4292-8671-5ab4731ebb6d/New_Issue_–_YouTrack.png'/>
<get url='https://tigase.cloud:443/upload/19807e3b-c0c0-4292-8671-5ab4731ebb6d/New_Issue_–_YouTrack.png'/>
</slot>
</iq>

Though I'd say it may be an issue with http-upload component which returns some error on accessing PUT endpoint (or AWS s3 limitation).

Andrzej Wójcik (Tigase) commented 4 years ago

Maybe the issue is with dash or underscore in the file name and S3 limitations

Andrzej Wójcik (Tigase) commented 4 years ago

@wojtek according to https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).

So the issue is on the server side in AWS extension for HTTP file upload

wojciech.kapcia@tigase.net commented 4 years ago

Most likely hyphen/dash. I've created #http-105.

wojciech.kapcia@tigase.net commented 4 years ago

Attaching problematic file.

New_Issue_–_YouTrack.png

wojciech.kapcia@tigase.net commented 4 years ago

File was created with Skitch.app.

Andrzej Wójcik (Tigase) commented 4 years ago

The issue was fixed in #http-105 - filename is now URL encoded in the URL generated by HTTP File Upload component.

wojciech.kapcia@tigase.net commented 4 years ago

(Closing as the relevant server-side issue was fixed)

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
5.0
Spent time
15m
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/beagle-im#350
Please wait...
Page is in error, reload to recover