Am checking out media module in combination with plupload.
I guess they are mutually dependent, at least plupload probably needs media to work.

Downloaded all dependencies, mostly used HEAD versions, might be risky, I know. I get this error when trying to batch upload Images:

    *  The specified file temporary://p15cu23j8t4q89i19lp1dem5og1.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
    * PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1285204079 ) in drupal_write_record() (line 6271 of D:\xampp-neu\htdocs\test\drupal-head-media\includes\common.inc).
CommentFileSizeAuthor
#29 eror.PNG41.78 KBalimalik
#5 plupload-920038.patch798 bytesJackinloadup
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eigentor’s picture

Forgot to say: this is me testing it on a local Windows 7 machine with Xampp as my web server.

rodenp’s picture

I have exactly the same issue.

* The specified file temporary://p15d4nljqis1518qk25230f12ua1.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1285428010 ) in drupal_write_record() (line 6244 of X:\websites\dev.site1.com.au\includes\common.inc).

greggles’s picture

Assigned: Unassigned » JacobSingh

Either Jacob or Effulgentsia should look at this. I'll choose Jacob...

Jackinloadup’s picture

Same issue

Jackinloadup’s picture

FileSize
798 bytes

I did find the source of the problem, but I don't know a solution. I'm not sure why this 'security check' is in place.

offending lines:
plupload.module around line 251 where it says
// Check the file name for security reasons

This patch comments this out and gets the module to function... maybe not securely.. lawl

Jackinloadup’s picture

Status: Active » Needs review

Bump, has anyone used the patch I provided above?

TechDragon’s picture

Manually made the changes to plupload.module.
Tested Successfully. Uploads are now succeeding where they were previously failing.

However i cant speak of any security implications. Can someone more familiar with the module comment on the security implications?

:: Edit ::
Scratch that. Same issue seems to have cropped up again. Uploads are stalling shortly after starting again.
I'm going to turn on more logging & see what I can dig up.

Jackinloadup’s picture

@TechDragon hmm interesting. Post up any information you find out. I haven't run into a stalling issue myself. Though I think that a stalling issue would probably be unrelated to the original bug request.

The specified file temporary://p15d4nljqis1518qk25230f12ua1.jpg could not be copied

Are you still getting that error?

TechDragon’s picture

Seems to stall after about 50-100KB of the file is uploaded and so far i cant seem to find any specific errors.
It stalls trying to upload more images into a gallery. The first upload of content into a gallery works fine for any number of items.
Seems like you might be right about a different bug. Possibly one related to media gallery.

Jackinloadup’s picture

Well it sounds like it is still related to Plupload but just not the same issue. Open a new issue about uploads stalling with your info. Is this problem consistant for you across browsers and computers. Also if possible try to test it on a different connection. I'm just thinking about eliminating other sources of issues.

We just need a module maintainer to take a review this patch and resolve the security issue.

Thanks for the help everyone.

Scott J’s picture

Eigentor and Rodenp, what browser are you using?

I have this error if using Firefox, but no problem with IE 8. So perhaps this happens only with HTML5 method?

rodenp’s picture

I get the error using both firefox and chrome. However with ie when i drag a number of files from the file browser to the drop window I get taken immediately to the actual location of the first uploaded file, rather than back to the upload screen with the files awaiting me click on 'start upload'. For example I am uploading a group of files from Windows 7 under Apache from my pictures library and when i drop the files I am taken to C:\Users\Peter\Pictures\1PIP.jpg.

I did as jackinloadup suggested in #5 (commenting out security test) and it appears to work with firefox and chrome.

Ryanbach’s picture

Status: Needs review » Reviewed & tested by the community

This is an issue that only seems to happen on HTML5. #5 patch works well. The code may need to be fixed instead of commented out, however.

Ryanbach’s picture

Priority: Normal » Critical

Set to correct priority.

Ryanbach’s picture

Note: 5 fixes stalling error when using HTML5 but it does not fix the

"* The specified file temporary://filename.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename." error.

Christopher James Francis Rodgers’s picture

Status: Needs work » Reviewed & tested by the community

2015.03.16 - Updated

Per my experiences, and research
4-years ago:

The 'Final' solution that always worked was:

All you really need to do if you are having problems
is to remove the forward-slash ("/") from "/tmp"
and specify...

tmp

...only, at --> [Your-D7-root-home] » Administration » Configuration » Media: File system » Temporary directory.

rikclout’s picture

subscribing

Christopher James Francis Rodgers’s picture

Title: Upload does not work » Upload does not work - solution

I corrected my post above to reflect a better solution.

The details are at http://drupal.org/node/1106492.

Christopher James Francis Rodgers’s picture

Title: Upload does not work - solution » Upload does not work
David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs work

As others already pointed out above, we can't commit a patch that just removes that security feature altogether.

Please try the latest patch at #953242: Undefined $i wreaks havoc in plupload_element_value(). I think there is a good chance it will resolve the issue reported here also.

ay13’s picture

Status: Reviewed & tested by the community » Needs work

I just wanted to mention something that fixed the issue for me. The latest version of plupload (1.4.2) seems to be one of the problems. I installed plupload 1.2.3 after seeing that is what Drupal Gardens uses and it works fine. Could be an issue of something changing in the newer release that the module isn't accounting for.

David_Rothstein’s picture

Status: Needs work » Closed (duplicate)

Yup, that's exactly what's addressed in the issue I linked to above... the patch there should make the module work with 1.4.2 as well.

I'm pretty sure these issues are duplicates of each other, so for now, I'm closing this one. (We can reopen it if people are still experiencing problems even after using the patch from the other issue.)

alimalik’s picture

i am having the same issue:

The specified file temporary://p17r3dallare9p4u17d5tle8e4.tmp could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp, type) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1369135475 [:db_insert_placeholder_7] => default ) in drupal_write_record() (line 6988 of /home/content/s/k/e/skelsmerghpc/html/test/includes/common.inc).

slashrsm’s picture

It seems like the uploaded file is not where it should be. Are you sure file uploaded correctly? Is webserver allowed to write in temporary files folder? Do you have multi-server environment?

alimalik’s picture

Well server is allowed to write temporary files as all folders have 777 permissions. no there is not multi-server environment. i am uploading the file from my local machine

alimalik’s picture

Hi slashrsm

I have checked all the permissions for the directories which have images. they are all set to 777 permissions and also our environment is multi-server which may be the reason.
please suggest me any suitable solution.
Any help shall be highly appriciated

slashrsm’s picture

In multi-server be sure that temp files folder shares across all servers.

alimalik’s picture

@slashrsm Do you think its only permission issue?

alimalik’s picture

FileSize
41.78 KB

Please see my screenshot

slashrsm’s picture

I would say that it's permissions issue or wrong configuration of your multi-server env.

alimalik’s picture

yes you are right . it was issue with temp path. it is fixed now
thank you slashrsm

prophet108’s picture

Issue summary: View changes

If you are hosted on Acquia cloud, you can use this module that was written to solve this issue: https://www.drupal.org/project/acquia_cloud_sticky_sessions

Christopher James Francis Rodgers’s picture

.
Per my experiences, and research 4-years ago:

The 'Final' solution that always worked was:

All you really need to do if you are having problems
is to remove the forward-slash ("/") from "/tmp"
and specify...

tmp

...only, at --> [Your-D7-root-home] » Administration »
Configuration » Media: File system » Temporary directory.
.

===

The page link below is to the original issue page
that I was working with. I did try to keep track of,
and update all other pages related to the issue,
but it would appear that I missed this page
with my 'Final' solution.

Sorry.

I certainly hope the solution above
may be of benefit to you.

===

Original issue page, aka, the 'train-wreck' :o)

D7 Manual Webhost Install Errors from "/tmp" - the default
"Temporary directory" in "Media: Filesystem" - Solution.
See http://drupal.org/node/1106492