Welcome! Log In Create A New Profile

Advanced

Re: upload module parameters issue

Andrew Hammond
October 04, 2011 04:50PM
On Tue, Oct 4, 2011 at 10:06 AM, Francis Daly <francis@daoine.org> wrote:

> On Mon, Oct 03, 2011 at 05:35:05PM -0700, Andrew Hammond wrote:
>
> Hi there,
>
> > Thanks very much, that really helped!
>
> > > Note that "resumable" can apply to a single file, without any
> > > $upload_field_name set, so you'll get things like "_name" and
> > > "_content_type" in your final post content.
> >
> > What would be the right way to get the $upload_field_name populated?
> > Or should I even worry about that? I don't imagine that my usage will
> > care about it (I'm going to be including the module and uploading a
> > single file at a time), however I'd like the library code to not suck
> > too much for the next guy.
>
> I'd say "don't worry about it".
>

Done. I refactored the code to clean it up a little and correct that overlap
bug. It's on github and can be forked if anyone wants to go further.

My last (I think) issue is that I'm seeing most, but not all of the upload
form fields get set. The sha1, md5 and crc32 aggregates below are blanks.

request.POST <QueryDict: {
u'upload_name': [u'py_lightweight_uploader.py'],
u'upload_size': [u'11345'],
u'upload_sha1': [u''],
u'upload_content_type': [u'text/x-python'],
u'upload_path': [u'/var/lib/nginx/resumable_download/7/64565707'],
u'upload_md5': [u''],
u'upload_crc32': [u'']}>

I see that libssl is installed on the server. I don't see any entries in the
error log that would make me think there is anything failing here. I have
the following in the nginx config:

upload_set_form_field upload_name $upload_file_name;
upload_set_form_field upload_content_type $upload_content_type;
upload_set_form_field upload_path $upload_tmp_path;
upload_aggregate_form_field upload_sha1 $upload_file_sha1;
upload_aggregate_form_field upload_size $upload_file_size;
upload_aggregate_form_field upload_crc32 $upload_file_crc32;
upload_aggregate_form_field upload_md5 $upload_file_md5;

I based the above on the documentation and example config. What am I missing
here?

Andrew
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upload module parameters issue

Andrew Hammond October 03, 2011 08:36PM

Re: upload module parameters issue

Francis Daly October 04, 2011 01:08PM

Re: upload module parameters issue

Andrew Hammond October 04, 2011 04:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready