File Upload widget needed

Bug #115215 reported by Brad Crittenden
10
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

In several spots we upload files (bug attachments, product release files, etc) and have to duplicate code to process those files and submit them to the Librarian. A FileUploadWidget that handled a lot of the common tasks would be useful to have.

Here are some thoughts from BjornT:

" 1) Have the widget simply return a FileUpload object
    2) Have the widget return a LibraryFileAlias
    3) Return a raw byte stream, adding some methods to the widget for
       getting the filename and content type.

I think the second option would be best; but it depends on what the
callsites look like."

Changed in launchpad:
status: Unconfirmed → Confirmed
Changed in launchpad:
importance: Undecided → Medium
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Having the FileUploadWidget return a LibraryFileAlias will incur an overhead if the file is rejected.

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 115215] Re: File Upload widget needed

On Wed, Sep 10, 2008 at 07:20:32PM -0000, Edwin Grubbs wrote:
> Having the FileUploadWidget return a LibraryFileAlias will incur an
> overhead if the file is rejected.

What kind of overhead? And what do you mean by rejected? Do you mean
that the upload to librarian would fail?

    subscribe bjornt

Curtis Hovey (sinzui)
tags: added: tech-debt
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
importance: Medium → Low
Revision history for this message
Robert Collins (lifeless) wrote :

We use the librarian in many places, making it easy to use robustly is fairly important.

However the approach described here may be stale - our extensive use of ajax may in fact mean this is even redundant.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.