Click here to Skip to main content
16,004,647 members

Comments by JasonTsoum77 (Top 57 by date)

JasonTsoum77 11-Feb-22 7:55am View    
Hi friend thanks for your time and your help, I wrotte the code but no errors returned from json url (I aslo test the json from url and no validator errors returned I should mentioned that at firts) but still the exported content to the txt file is not passing the json validator it reurns parse errors
JasonTsoum77 3-Sep-21 11:32am View    
Thank you for your answer and your time friend , I tried it but I receive the following error message "Uncaught Error: Call to undefined function str_starts_with()" I don't why maybe my php version does not contain the function ? instad I trid (strpos($uri, $string)){.....} and it seems that it works but I dont know if this is the correct solution, Thank you again
JasonTsoum77 12-Apr-14 11:14am View    
Thnx for your help, it also work!!!
JasonTsoum77 11-Apr-14 11:41am View    
It worked!!! the first solution "http://imageresizing.net/docs/howto/upload-and-resize[^]"
I modify my code just like that and of I have to install imageresizer (very good util I did't knew it)
Thnx for your help!!!

try
{
int count = 10;
// FileUpload1.PostedFile.SaveAs(path2 + FileUpload1.FileName);
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(FileUpload1.FileName);
string fileExtension = Path.GetExtension(FileUpload1.FileName);
fileNameWithoutExtension = Convert.ToString(count);
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/gallery/thumbs/" + fileNameWithoutExtension + fileExtension));

foreach (string fileKey in HttpContext.Current.Request.Files.Keys)
{
HttpPostedFile file = HttpContext.Current.Request.Files[fileKey];
if (file.ContentLength <= 0) continue;
ImageResizer.ImageJob i = new ImageResizer.ImageJob(file, "~/uploads/<guid>.<ext>", new ImageResizer.ResizeSettings("width=20;height=22;format=jpg;mode=max"));
i.CreateParentDirectory = true;
i.Build();
}

Label1.Text = "File uploaded!";

}
JasonTsoum77 11-Apr-14 11:27am View    
Hi Nilesh thnx for your response the second solution I find it too but it didn't worked,
http://stackoverflow.com/questions/254419/asp-net-image-uploading-with-resizing[^]
I have tried many codes from the internet which suppose that they resize an image but nothing,
I will try and the first one that you send and I will inform tou thnx again