File uploading on live server failing - asp.net-mvc-3

byte[] bytes = Convert.FromBase64String(Picture);
System.IO.File.WriteAllBytes(Server.MapPath("~/Content/" + Name), bytes);
This code works well on local server but when I try to run it on live server this gives error and file is not uploaded in content folder.

Please check if you have write permission of folder where you are trying to save the image. I feel that might be only problem, otherwise Server.MapPath(..... should work fine.

Related

.exe file in S3 Browser does not work when the user downloads it via the S3 web link file and starts the installation

I created an .exe file from a Windows application made with Flutter and uploaded it to the S3 browser in a bucket. This works but then when someone downloads the file via the URL provided by S3 and runs the file, the installation does not start. Sometimes the file even deletes itself when it is run. This is strange because I have tried sending the same file to users with other tools and it works.
I first tried to change the permissions that can be seen in the S3 browser as "Full Control", "Read" or "Write" but without result. I then changed the MIME type of the file to be the same at the origin of the file and in the S3 browser, namely "application/x-dosexec". It was not known to the S3 browser, so I added it but it didn't change anything. I also checked the checksum before uploading to S3 and after uploading and it was the same. Any ideas ?

error on loading url images in codename one app how can i solve this

Exception: java.lang.IllegalArgumentException - create image failed for the given image data of length: 1420
EncodedImage placeholder = (EncodedImage) initForm.theme.getImage("avater.png");
icon1 = URLImage.createToStorage(placeholder, "tyrion", "https://www.dropbox.com/s/52tu8jkqg1pikvw/jpeg?dl=1");
This seems to be a connectivity issue. I looked at the file and it's a 16k file yet you downloaded only 1,420 bytes so you got an error. I'm guessing that the link is redirecting and we get an HTML error page which is what you see.
It's also possible that this failed to you once and you're now still looking at the cached failed download.
The downloaded file should be in your .cn1 directory (assuming this is on the simulator) under the name "tyrion". First try to just delete it.
If this doesn't help look at it's contents, it could be an HTML error file.

Laravel 4 - can't access images in public folder

I have a strange behaviour from Laravel. I just copied the website to a new hoster. Everything is working quite fine but one thing: I can't access the images in my public folder. If I try to open an image on my own with "domain.com/img/Ausfahrten/42.png i get the following error:
error image loading
The folder structure on my server looks like this:
enter image description here
What method can't laravel find and how can I resolve this? I've already checked file permissions on the server, everything's fine there.
Laravel throw that error when it cannot find the file. Try to access to another directory without Uppercase letter in its path name.

Nodejs Websocket image upload not working on CentOS

I implemented the websocket file upload implementation as described on:
http://code.tutsplus.com/tutorials/how-to-create-a-resumable-video-uploade-in-node-js--net-25445
It worked great on my Ubuntu VM. But when I uploaded the code to a CentOS 6 server, images didn't work when they got uploaded. I then tried uploading a large text file, and it was fine. I then tried a ZIP, and it still didn't work. The file on the server and the file being uploaded have exactly the same file size so it appears to work fine. I can only assume some sort of character encoding issue? But basically I am really stuck. Anyone got any ideas?
I'm tempted to try using Ajax to get it working if I haven't made any progress in the next day or 2.
I found solution.I had to apply new chain rule for iptables,and allow server to listen on custom port for web sockets..After that,everything works great. I had to make it permanent.

Codeigniter file upload only works on localhost but no on production server

My problem is that i made a file upload with codeigniter, and the allowed file types are: DOC, PDF, RTF, DOCX, and its working fine on localhost.
But when im upload it on a production server, no matter what file type im trieing to upload nothing is excepted.
Did anybody else ran into this problem? or can someone give me a hint?
Thank you
Maybe the production server doesn't recognize your file properly.
You can try to add
'application/octet-stream'
as a new mime type to
APPPATH/config/mimes.php
for 'doc' and etc.

Resources