Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#1638 closed defect (obsolete)

Browse.xo mangles filenames during upload

Reported by: martin.langhoff Owned by: lucian
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.84.x
Severity: Unspecified Keywords: dextrose
Cc: Distribution/OS: OLPC
Bug Status: Assigned


This may be an issue with the Journal/DS interaction rather than a pure Browse.xo issue.

On 0.84.9 with Browse-108

  • from the commandline, create a file, for example a patch: foo.patch
  • use copy-to-journal to add it to the journal -- or copy it to a mounted USB disk
  • open Browse, login to
  • try to upload the patch to a bug

Expected: preserved filename (or titlename), reasonable extension. Something similar to what we do when copying from the DS to an external USB disk.

Actual result: tmpXYZ1234

There are two reasons why this is important:

  • I do use Sugar to develop Sugar -- want to be able to upload patches sanely.
  • Webapps do rely on the names and extensions provided (with due care of sanity-cleanup of spurious chars). This affects our friendly Moodle, heart of the XS.

Change History (12)

comment:1 Changed 14 years ago by martin.langhoff

BTW, it is always desirable to _improve_ the integration using the info in DS to tell Browse.xo about the mimetype.

But extensions should be addressed first and foremost -- almost all webapps ignore the mimetypes set on POST and do some extension matching & content sniffing.

comment:2 Changed 14 years ago by tomeu

These issues were already tracked and maybe also fixed. If we can find those, we may be able to just backport the fixes.

comment:3 Changed 14 years ago by tonyforster

Browse will correctly add a png extension when uploading a screenshot but not if the journal already has a .extension in the entry
Screenshot of "foo" uploads as screenshot of "foo".png
Screenshot of "foo.ta" uploads as screenshot of "foo.ta"

comment:4 Changed 14 years ago by tonyforster

  • Keywords dextrose added

comment:5 Changed 13 years ago by seeta

  • Status changed from new to assigned

comment:6 Changed 13 years ago by smparrish

  • seeta_dev set to Lucian

comment:7 Changed 13 years ago by lucian

  • Bug Status changed from Unconfirmed to Assigned
  • Owner changed from erikos to lucian
  • Status changed from assigned to accepted

It seems this is deliberate:

So far, the best solution I can think of is always appending mime_extension. We could have a database of which extensions not to append to, like "jpg" vs "jpeg", but that may be too long a regex.

comment:8 Changed 13 years ago by lucian

Seeing as any fully correct solution is too complicated, I'm opting for saving functionality, at the possible expense of a few weird names (bla.jpg.jpeg), at least for now.

If a better solution comes along later, even better.

comment:9 Changed 13 years ago by lucian

The Browse side is fixed with

For the file name to be preserved, the DS would need to be fixed.

comment:10 Changed 13 years ago by RafaelOrtiz

  • Component changed from Browse to sugar
  • Milestone changed from Unspecified by Release Team to 0.94

Changing to sugar, due to the fact that browse part is addressed.
Changing milestone

comment:11 Changed 11 years ago by dnarvaez

  • Resolution set to obsolete
  • Status changed from accepted to closed

comment:12 Changed 11 years ago by dnarvaez

  • Milestone 0.94 deleted

Milestone 0.94 deleted

Note: See TracTickets for help on using tickets.