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

inputName client settings not recognized by the php.php. #484

Closed
Alain-Lavoie opened this issue Nov 24, 2012 · 2 comments
Closed

inputName client settings not recognized by the php.php. #484

Alain-Lavoie opened this issue Nov 24, 2012 · 2 comments

Comments

@Alain-Lavoie
Copy link

When using the following configuration:

$(document).ready(function () {
$('#aphoto').fineUploader({
request: {
endpoint: '../api/photos/send',
inputName: 'file',
customHeaders: {},
forceMultipart: false,
params: {'XDEBUG_SESSION_START':'netbeans-xdebug'}
},
callbacks: ...

the Php.php server proposed implementation generates an error, because, it
does not recognize the inputName setting. When setting it to qqfile, it does
process correctly. I do not know if the php.php is a proposed implementation or
a supported implementation by this package. This implementation assumes a GET
request, although my tracing on Chrome network packets does shows a POST.

Regards.

@rnicholus
Copy link
Member

"qqfile" is the default value for the inputName property. If you deviate from this default value, you will need to change the example accordingly.

The implementation does not assume a GET request. $_GET is simply used in PHP to grab parameters passed via the query string. The $_GET and $_POST global names do not necessarily reflect the request method.

There is a pending feature request to allow parameters to be sent only in the request body. Once this is completed, you will be able to switch this behavior on by setting an option. Please see #113 for more details.

KJLJon added a commit to KJLJon/file-uploader that referenced this issue Dec 8, 2012
<a href="https://github.com/valums/file-uploader/issues/484">#484</a>
I know it says it has been put on hold (but this adds support to the php file to customize the inputName)

So if you use
inputName in the javascript options
you will have to set the $inputName (see commented example on line 12)
@KJLJon
Copy link
Contributor

KJLJon commented Dec 8, 2012

@Alain-Lavoie see:
@04fc047

It should fix your problems

@rnicholus rnicholus mentioned this issue Dec 8, 2012
KJLJon added a commit to KJLJon/file-uploader that referenced this issue Dec 13, 2012
I had a hard time to get github to merge the file (probably because I am not too familiar with merging branches, and my powershell keeps on erroring on me).

But this is merging the current php file with <a href="https://github.com/valums/file-uploader/pull/522">#522</a> and <a href="https://github.com/valums/file-uploader/pull/523">#523</a>
rnicholus pushed a commit that referenced this issue Dec 17, 2012
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