Prevent files from being uploaded after the UiComponent's ajax file uploadMagento - get uploaded file name in...

Can you tell from a blurry photo if focus was too close or too far?

Why isn't there a non-conducting core wire for high-frequency coil applications

Injecting creativity into a cookbook

Traveling through the asteriod belt?

How to deal with an incendiary email that was recalled

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

What is the wife of a henpecked husband called?

Porting Linux to another platform requirements

Why Normality assumption in linear regression

Why do neural networks need so many training examples to perform?

Using only 1s, make 29 with the minimum number of digits

Citing paywalled articles accessed via illegal web sharing

Early credit roll before the end of the film

Can making a creature unable to attack after it has been assigned as an attacker remove it from combat?

Dilemma of explaining to interviewer that he is the reason for declining second interview

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Can we use the stored gravitational potential energy of a building to produce power?

Avoiding morning and evening handshakes

CREATE ASSEMBLY System.DirectoryServices.AccountManagement.dll without enabling TRUSTWORTHY

Is a debit card dangerous in my situation?

How do Chazal know that the descendants of a Mamzer may never marry into the general populace?

What is this metal M-shaped device for?

Publishing research using outdated methods

Why do members of Congress in committee hearings ask witnesses the same question multiple times?



Prevent files from being uploaded after the UiComponent's ajax file upload


Magento - get uploaded file name in form upload fieldFile is not being uploaded from front endupload file from adding a custom step on checkout onepageMagento 2 Adminhtml spreading forms across multiple tabsUpload file from frontendMagento 2 : How can I upload files of dynamically added file input fields in the adminHandling file uploads behind a load balancerCan't upload file with ajax and Magento 1.9Overwriting the uploaded files with same name in ui-component formsMagento 2 How to display placeholder image to image preview backend UI component form













1















I'm currently implementing the UiComponent's Form Component, which has a section on using file uploads.



You can define the file upload path and after selecting a file in your form, an AJAX call is being executed where you can process the upload.



However, because this request is "stateless", if you submit your form afterwards, the files selected are still being uploaded.



In other words, You do the same upload of the file twice, once in the ajax call and once on form submit.



Is there a way to notify the Form & let it know we've already uploaded and processed the file?










share|improve this question





























    1















    I'm currently implementing the UiComponent's Form Component, which has a section on using file uploads.



    You can define the file upload path and after selecting a file in your form, an AJAX call is being executed where you can process the upload.



    However, because this request is "stateless", if you submit your form afterwards, the files selected are still being uploaded.



    In other words, You do the same upload of the file twice, once in the ajax call and once on form submit.



    Is there a way to notify the Form & let it know we've already uploaded and processed the file?










    share|improve this question



























      1












      1








      1


      1






      I'm currently implementing the UiComponent's Form Component, which has a section on using file uploads.



      You can define the file upload path and after selecting a file in your form, an AJAX call is being executed where you can process the upload.



      However, because this request is "stateless", if you submit your form afterwards, the files selected are still being uploaded.



      In other words, You do the same upload of the file twice, once in the ajax call and once on form submit.



      Is there a way to notify the Form & let it know we've already uploaded and processed the file?










      share|improve this question
















      I'm currently implementing the UiComponent's Form Component, which has a section on using file uploads.



      You can define the file upload path and after selecting a file in your form, an AJAX call is being executed where you can process the upload.



      However, because this request is "stateless", if you submit your form afterwards, the files selected are still being uploaded.



      In other words, You do the same upload of the file twice, once in the ajax call and once on form submit.



      Is there a way to notify the Form & let it know we've already uploaded and processed the file?







      magento2 ajax forms uicomponent file-upload






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 10 mins ago









      Teja Bhagavan Kollepara

      2,96341847




      2,96341847










      asked Oct 13 '17 at 15:04









      MerijnMerijn

      776




      776






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f197178%2fprevent-files-from-being-uploaded-after-the-uicomponents-ajax-file-upload%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f197178%2fprevent-files-from-being-uploaded-after-the-uicomponents-ajax-file-upload%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          夢乃愛華...