File upload product attribute with multiple files

2 years ago
HI,
I am trying to implement file upload product attribute that can upload multiple files. I am able to upload multiple files with upload file button but when I am pressing add to cart button only one file is saved but rest are not. can you please help me to solve this problem? here I gave a picture: https://drive.google.com/file/d/1jk_wloxWaPIghzJ-370U6X2QhlwL-Lgx/view?usp=sharing
2 years ago
Hey SheikhJubair,

I have just implemented something to solve this, with code modification (not a plugin). If you still need I would be happy to share.  

Best regards
Jon

SheikhJubair wrote:
HI,
I am trying to implement file upload product attribute that can upload multiple files. I am able to upload multiple files with upload file button but when I am pressing add to cart button only one file is saved but rest are not. can you please help me to solve this problem? here I gave a picture: https://drive.google.com/file/d/1jk_wloxWaPIghzJ-370U6X2QhlwL-Lgx/view?usp=sharing
1 year ago
Could you share it please?.
Thanks a lot
1 year ago
Hi!

I need too this customization. Can anyone to share it to me? Thanks for help.
11 months ago
Would be helpful to me as well. Why do people not respond after offering a solution on this forum? ;-/
1 week ago
IFormFile to upload image and store in db with path

HTML

<h6 class="title-req">4. Image Uploads</h6>
                        <div class="form-ui">
                            <input type="file" name="postedFiles" id="postedFiles" multiple="multiple" />
                        </div>


IHostingEnvironment hostingEnvironment

IList<IFormFile> attachmentFilePaths = null



var uploads = Path.Combine(_hostingEnvironment.WebRootPath, "uploaded");
            var filePath = string.Empty;

            if(attachmentFilePaths != null)
            {
                foreach (var file in attachmentFilePaths)
                {
                    if (file.Length > 0)
                    {
                        filePath = Path.Combine(uploads, file.FileName);
                        using (Stream fileStream = new FileStream(filePath, FileMode.Create))
                        {
                            file.CopyToAsync(fileStream);
                        }
                    }
                }
            }