Keyword

Problems uploading video and image

  • Millan Hermana Mendioroz
  • Millan Hermana Mendioroz's Avatar Topic Author
  • Offline
  • New Member
More
15 years 1 month ago #70427 by Millan Hermana Mendioroz
Problems uploading video and image was created by Millan Hermana Mendioroz
Hello everyone!
I've just installed K2. I have a problem, when in a item, i go to the video or image tab, i cant upload any files. I mean, i select the file, (image or video) from my pc, and i dont have button for the upload. I try to save the item, but the image dont get saved.
Someone with this problem? any solution?

Thank yOu!

Please Log in or Create an account to join the conversation.

More
15 years 1 month ago #70428 by ROLF ERIK PAULSEN
Replied by ROLF ERIK PAULSEN on topic Problems uploading video and image
Hi Millan,
you can check the following error to see if your problem is the same:
k2community.joomlaworks.gr/forum/topics/adding-item-image-fa...

In short, the solution in the above thread was to bypass the media-type authentication at upload.
yes... this is not a pretty solution - and may potentially cause security issues... but it got my site up and running!

In ......../administrator/components/com_k2/lib/class.upload.php replace the following:
if (!$allowed) {
$this->processed = false;
$this->error = $this->translate('incorrect_file');
} else {
$this->log .= '- file mime OK : ' . $this->file_src_mime . '';
}
with:
if (!$allowed && 1 < 0) { //Make sure this never happens!
$this->processed = false;
$this->error = $this->translate('incorrect_file');
} else {
$this->log .= '- file mime OK : ' . $this->file_src_mime . '';
}

Please Log in or Create an account to join the conversation.

  • Millan Hermana Mendioroz
  • Millan Hermana Mendioroz's Avatar Topic Author
  • Offline
  • New Member
More
15 years 1 month ago #70429 by Millan Hermana Mendioroz
Replied by Millan Hermana Mendioroz on topic Problems uploading video and image
MaN! Thank you very much!
That make it!!! Uff, i have been 3 days with this problem...
Thank you again!

Rolf Erik Paulsen said:Hi Millan, you can check the following error to see if your problem is the same:
k2community.joomlaworks.gr/forum/topics/adding-item-image-fa...

In short, the solution in the above thread was to bypass the media-type authentication at upload.
yes... this is not a pretty solution - and may potentially cause security issues... but it got my site up and running!

In ......../administrator/components/com_k2/lib/class.upload.php replace the following:
<br/>
if (!$allowed) {<br/>
$this-&gt;processed = false;<br/>
$this-&gt;error = $this-&gt;translate('incorrect_file');<br/>
} else {<br/>
$this-&gt;log .= '- file mime OK : ' . $this-&gt;file_src_mime . '';<br/>
}<br/>
with:
if (!$allowed &amp;&amp; 1 &lt; 0) { //Make sure this never happens!
$this-&gt;processed = false;
$this-&gt;error = $this-&gt;translate('incorrect_file');
} else {
$this-&gt;log .= '- file mime OK : ' . $this-&gt;file_src_mime . '';
}

Please Log in or Create an account to join the conversation.

More
15 years 2 weeks ago #70430 by tommy huang
Replied by tommy huang on topic Problems uploading video and image
Hello, Bruno,

I don't understand "put the image and after I visualized on the browser" means to put the image somewhere and to view it via browser?
I really need to figure out how to upload images to K2 normally.

Thank you!


Bruno said:Hi guys ...
After a stress moment, I tried to upload of image of the longer way. But ... it's work!
Ok ... First of all, I upgraded my web-site in LocalHost ... I put the image and after I visualized on the browser (I think is this mode that is generated all others image ... large, small, etc).

That's OK until here! Everything normal ...

And now, I imported just the table **_k2_items of the base and uploaded the images created in the folder \media\k2\items\cache and sometimes src ... ready!

This is a long way to put a simple image in K2, when it can do this on-line ... However, it isn't doing.

I hope to serve for someone ...

See you,

Bruno

Please Log in or Create an account to join the conversation.

More
15 years 2 weeks ago #70431 by tommy huang
Replied by tommy huang on topic Problems uploading video and image
Hi, Millan,

I did edit the code but nothing works. Can you please tell me how to make the changed code work? What to do after editing the code?

Thank you. Really need help here....

Tommy

Millan Hermana said:MaN! Thank you very much! That make it!!! Uff, i have been 3 days with this problem...
Thank you again!

Rolf Erik Paulsen said:Hi Millan, you can check the following error to see if your problem is the same: k2community.joomlaworks.gr/forum/topics/adding-item-image-fa...

In short, the solution in the above thread was to bypass the media-type authentication at upload.
yes... this is not a pretty solution - and may potentially cause security issues... but it got my site up and running!

In ......../administrator/components/com_k2/lib/class.upload.php replace the following:
<br/>
if (!$allowed) {<br/>
$this-&gt;processed = false;<br/>
$this-&gt;error = $this-&gt;translate('incorrect_file');<br/>
} else {<br/>
$this-&gt;log .= '- file mime OK : ' . $this-&gt;file_src_mime . '';<br/>
}<br/>
with:
if (!$allowed &amp;&amp; 1 &lt; 0) { //Make sure this never happens!
$this-&gt;processed = false;
$this-&gt;error = $this-&gt;translate('incorrect_file');
} else {
$this-&gt;log .= '- file mime OK : ' . $this-&gt;file_src_mime . '';
}

Please Log in or Create an account to join the conversation.

More
14 years 4 weeks ago #70432 by Christine
Replied by Christine on topic Problems uploading video and image
We have tried this fix (replacing the code snippet as outlined above), and also going through and making sure all files are rw but still, no luck. Can't add image through K2 items in admin.

Any other ideas.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #70433 by L. Arnold
Replied by L. Arnold on topic Problems uploading video and image
I am having similar problems. A few work throughs it seems:

1: I can just sepcify the file, then push save to the Item and it does upload by itself.

2: for SIG Pro, I did need to change the default folder to: media/k2/galleries to get it to work properly. I found I could also bypass K2 before that by using ninjaexplorer and placing folders with individual pictures in images/stories (and the rest of the default folder from SIG.

A simple UPLOAD button would be very helpful.

Please Log in or Create an account to join the conversation.

  • J Velasco Echeverry
  • J Velasco Echeverry's Avatar
  • Offline
  • New Member
More
13 years 9 months ago #70434 by J Velasco Echeverry
Replied by J Velasco Echeverry on topic Problems uploading video and image
Hi there, did you solve this problem?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum