I am unable to upload a product image in broadleaf commerce via the broadleaf admin site. When I try to upload image from a local file, I get the following error
HTTP ERROR 500
Problem accessing /admin/asset/uploadAsset. Reason:
File operation attempted on file that is not in provided work area. D:\DOCUME~1\Gutha\LOCALS~1\Temp\5e\a2\gal_w01.jpg. Work area = D:\DOCUME~1\Gutha\LOCALS~1\Temp\/5e/a2/
I tried creating that folder, and placing the image in that area, but it is of no use becaues each time a new folder is being shown here. Could any one tell me where should I place the images to be uploaded?
Thanks in advance.
Sounds like a bug. I've opened a ticket that you can track here ...
https://github.com/BroadleafCommerce/BroadleafCommerce/issues/773
If you can, let us know what version you are running into the issue in the above ticket.
FYI, I work for Broadleaf Commerce.
Related
I use Rich text Editor for uploading images & I create 1 data source for uploading image. When I upload image it is not shown (broken image logo), while I am not publish this image.
What is the problem?
The image is not shown because it cannot be severed for some reason. There could be any number of reasons for this. Here is how I would trouble shoot the issue:
upload an image via the RTE
Right click on the image, inspect element, look at the path to the image
it should say PROTOCOL://SERVER:PORT/static-assets/etc/etc/etc
If the URI doesn't start with static-assets then Crafter's download servlet cannot serve it. You need to fix the path in your datasource.
If the path does start with static-assets then check and see if the image is in your repository at that path specified. You probably won't find it there. If that's the case check your tomcat logs for an error. If the error doesn't help you, post it here and we will go from there.
I have the following problem: I haven an application which uses SpringMVC and Hibernate, and when the user uploads an image it stores it in the /resources/img folder, but when I have to do another deploy I complile my source code into a war, and then I deploy it again, overwriting the image that the user has just upload becose the whole folder is in the war. I don't know how it works, but the problem is that the user lose every image that he has uploaded when I deploy the app again.
Does anyone know the best way to solve this? I know that save the image in the database is not a good practice, so I want to avoid that.
Thank you!
So I am I am using java and maven and having an issue with my local google app engine, where i upload an image via the blobstore apis but then can not server the image back out, after restarting the app engine. An image uploaded, can be served prior to the restart.
What i think is happening is that the blob store is being cleared out when i restart (via the mvn clean). I had the same issue with the data store but fixed that by moving the data store file via a command line arg (-Ddatastore.backing_store)
What i can not find for the life of me is the proper command line arg for setting where the blob store is located. I think that if i set that my images would still be available to me.
ehhhhhhh... i feel like i could have found this before posting... but it was in a really weird spot.
The argument is blobstore.backing_store
i hope this helps someone tho.
I am working on a JSP project where the user needs to upload an image.
I need this image to be stored into the database so that it can be retrieved from the database later on. I need to show that image in the webpage itself as soon as the image has been loaded. I have tried several option like uploadbean, spring-3-mvc-fileupload-example.html, etc but nothing is working out for me.
Can you please give me a simple but effective way to do this? I am working with MySQL database.
Apurv I suggest you look at this library
http://commons.apache.org/fileupload/
The user guide is at http://commons.apache.org/fileupload/using.html
Try this one: http://commons.apache.org/fileupload/. It is simple and works fine. Although Spring also has wrapper for this component and I used it either directly or via Spring and both worked fine for me.
Hey, folks. What I'm trying to do is write a Confluence plugin containing a servlet that generates a pdf based on the Active Directory. Anyway, there is an attachment repository on the confluence space. Problem is, when I try to create an IText image from the pdf, it gets all buggy. I'm assuming it is because the page is behind a login. Any other images work just fine.
At any rate, is there a way, in Java, I can retrieve the image in even just a byte[] after logging in with some sort of credentials?
Error Example:
Image portrait = Image.getInstance(new URL("http://*Local Network*/download/attachments/3409000/PdfTestImage.JPG"));
^^ throws java.io.IOException: http://*Local Network*/download/attachments/3409000/John.Doe.JPG is not a recognized imageformat. at com.itextpdf.text.Image.getInstance(Image.java:317)
While
Image portrait = Image.getInstance(new URL("http://www.dominionpaper.ca/files/dominion-img/hedgehog.JPG"));
or anything else I put in there doesn't cause a problem. Any suggestions? I've used HttpClient before but I'm not positive if it'd be applicable.
You problem description is quite confusing. Let me repeat it to make sure I've got it right: you need to extract an image from a password-protected site, but you are not logged in into that site (user may be logged in, but not your server-side code)?
Then I'd suggest to user HttpClient to provide the correct credentials and download the file to local storage where you can process it the way you like. Note that if the site uses MS SSO, the task could be quite complicated, as your code would need a service account with AD/Kerberos.