webERP Forum

Full Version: Add Inventory item, Image upload failed...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi!

Now I want to add new inventory item, but image upload failed, I checked the size of the image less than the 300k, format is jpg.

After added new inventory item, all data loaded, but image can't and there are no error codes and error messages.

I checked folder "part_pics" are right, permission is also right, I also found brand logo files in this folder what I loaded from the brand funtion.

Now I don't know where maybe I set not so right?

Alex
If you run ls -l webERP/companies/<company> (whatever path you have before the part_pics directory)

...can you paste the full output line for the part_pics directory here?
(09-08-2019 11:28 AM)TurboPT Wrote: [ -> ]If you run ls -l webERP/companies/<company> (whatever path you have before the part_pics directory)

...can you paste the full output line for the part_pics directory here?

Alex: I have added a check for the file permissions to Stocks.php. Assuming you are using the latest webERP you should be able to just add the attached script straight in. Can you run it and check if it gives an warning about the permissions?

Paul: Even if this isn't Alex's problem it is worthwhile having this extra check so I have sent you a pull request.

Tim

[attachment=970]
Hi, Tim and Paul,

Thanks for your help, When I return to office, I will check and report to you.

Alex
Hi Tim,

I tried Stocks.php, haven't any error code and message yet, but problem also still there.
[attachment=971]

And I also used "ls -l order" to check folder "part_pics",
[attachment=972]

here enclosed the two screenshots.

Alex
Tim and Paul,

Now I am back to this thread.

I tried this image loading step again, and now I have found two different results for different steps.
1- If I add a new inventory item with a photo, the image loads successfully.
2- But if I added the inventory text data before, loading the image again will fail.

So the question now is how to add images again after entering text data?

Alex
Do you show any error(s) in the server logs?

I'm running out of ideas, as I'm not seeing the same behavior that you do.
Can you provide specific steps that you do so we can try the same steps to reproduce the issue?

Not sure if mentioned somewhere, but which webERP version do you have?
Hi Tim and Paul,

I think I found the reason for the unsuccessful, because of the "/" symbol problem.
[attachment=974]
Now I am facing a big problem, because we have already entered a lot of inventory data into the system, purchase orders and sales orders, as well as payment, some have been executed or in the process of implementation. If want to modify the inventory product number a lot now, it will be catastrophic.

So do you have good methods and suggestions?

Thanks!!!

Alex
Ah yes, I should have picked that up. Sorry!

There is a utility script called Z_ChangeStockCode.php that should change a code throughout the system. You should test this out first on a copy of your database, but it *should* work.

Alternatively if it is only the stock image that is affected then it should be possible to do some fudge with the code to save and display them. Of course then that change would need to be replicated each time you update the code, so if it woks OK then the first option is best.

Tim
Paul: We have a function called ContainsIllegalCharacters() which checks part codes for any characters that shouldn't be there (I don't really like this function but that's another story). Should we look to include the '/' in that function as a banned character?

Tim
Pages: 1 2
Reference URL's