nirajpathak / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
0 stars 0 forks source link

Uploading file without mimetype specified fails #327

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call $service->files->insert($file, array('data' => $data));

Don't specify mimetype for the Google_DriveFile $file or in the parameters of 
the insert.

What is the expected output? What do you see instead?

I expect it to upload the file without complaining. Instead:

Undefined index: content-type at 
/google-api-php-client\/src\/service\/Google_MediaFileUpload.php#99

What version of the product are you using? On what operating system?

Google API PHP Client 0.6.2

Linux PHP 5.3.5

Please provide any additional information below.

Is it possible to upload a file without specifying its mimetype? There are some 
cases where I don't know the mimetype of the file I want to upload.

Original issue reported on code.google.com by Gapczyns...@gmail.com on 31 May 2013 at 2:07

GoogleCodeExporter commented 8 years ago
This issue tracker is now closing. Development on the Google PHP client library 
moved to GitHub with the release of the 1.0.0-alpha, and now the 1.0 branch has 
reached beta status there will be no further releases of the 0.6 branch of the 
library. 

Please take a look at the latest version on 
https://github.com/google/google-api-php-client

For information on migrating, please take a look at this guide: 
https://developers.google.com/api-client-library/php/guide/migration

For general library support please ask a question on StackOverflow: 
http://stackoverflow.com/questions/tagged/google-api-php-client

If you are looking for support with a specific API, please contact the team 
working with that API via StackOverflow or their preferred support mechanism. 

If your issue still exists with the new version of the library, please raise a 
bug in the GitHub issue tracker with a minimal code sample. 

Thanks!

Original comment by ianbar...@google.com on 22 Jan 2014 at 4:53

GoogleCodeExporter commented 8 years ago
When i upload file , it is getting upload properly but i am getting an error 
message after redirect the page please have a look of attached screenshot.
Thank You in advance

Original comment by sasdrive...@gmail.com on 26 Mar 2014 at 5:52