<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: corrupted file will save on Dropbox`s Temporary link in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/759599#M33192</link>
    <description>&lt;P&gt;Yes That is me.&lt;/P&gt;&lt;P&gt;thankyou&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 06:44:19 GMT</pubDate>
    <dc:creator>Esikhoob</dc:creator>
    <dc:date>2024-03-25T06:44:19Z</dc:date>
    <item>
      <title>corrupted file will save on Dropbox`s Temporary link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757326#M33125</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;In our website, there is an option to uploads files to a Dropbox account. I have used Dropbox`s Temporary link for this purpose. I have implemented a solution which create the Temporary link using C# Dropbox SDK , and then upload file using&amp;nbsp;&lt;SPAN&gt;jQuery ajax post formdata.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The problem is that all video files (.mp4, .avi) get corrupted after this upload. Other files type get upload successfully.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;After creating a Temporary link &lt;/SPAN&gt;&lt;SPAN&gt;(for example:&amp;nbsp;&lt;A href="https://content.dropboxapi.com/apitul/1/eE8ccUfewDC6NQ" target="_blank" rel="noopener"&gt;https://content.dropboxapi.com/apitul/1/eE8ccUfewDC6NQ&lt;/A&gt;) ,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I use this code to upload:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;form action="https://content.dropboxapi.com/apitul/1/eE8ccUfewDC6NQ" method="post" enctype="multipart/form-data"&amp;gt;
            &amp;lt;input name="fileDropbox" type="file" class="form-control input-lg" readonly="true" onclick="return false;"&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above form will pass to following function via funtion`s "fileForm" parameter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function uploadFileToDropbox(fileForm, el) {
    const postData = new FormData(fileForm);
    $.ajax({
        url: $(fileForm).attr("action"), // Dropbox
        type: 'post',
        data: postData,
        crossDomain: true,
        dataType: 'json',
        success: function (res) {
            fileUploadRemain -= 1;
            if (fileUploadRemain === 0) // آیا همه فایلها آپلود شدند
                uploadLinkPreFile(el);
        },
        error: function (error) {
            let errorMess;
            if (error.error === undefined)
                errorMess = error;
            else if (error.error.error_summary === undefined) {
                errorMess = error.responseText; // مثلا: خطای پر شدن حساب دراپباکس
            }else  {
                errorMess = error.error.error_summary;
                console.log(error.error);
            }
            sendErrors.append("&amp;lt;div class='alert alert-danger'&amp;gt;خطا در " + errorMess + " :Dropbox&amp;lt;/div&amp;gt;");
            el.modal("hide"); // خطا را خوب اون پشت نوشتی، باید اینو ببندم یا نه؟!؟
            App.unblockUI(el);
            App.scrollTo(sendErrors);
        },
        cache: false,
        contentType: "application/octet-stream",
        processData: false
    });
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;The upload will finish with no error, but after downloading, the file is corrupted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This is a sample of corrupted video file:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/mozwd95idzs7w3au1k7fj/Trados_Learning.mp4?rlkey=tcthia2kw9s8iur2ve4opt0kn&amp;amp;dl=0" target="_blank" rel="noopener"&gt;Trados_Learning.mp4 (dropbox.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;please help me to resolve this problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 10:37:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757326#M33125</guid>
      <dc:creator>Esikhoob</dc:creator>
      <dc:date>2024-03-14T10:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: corrupted file will save on Dropbox`s Temporary link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757403#M33126</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1627076"&gt;@Esikhoob&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;The upload will finish with no error, but after downloading, the file is corrupted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is a sample of corrupted video file:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/mozwd95idzs7w3au1k7fj/Trados_Learning.mp4?rlkey=tcthia2kw9s8iur2ve4opt0kn&amp;amp;dl=0" target="_blank" rel="noopener"&gt;Trados_Learning.mp4 (dropbox.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;please help me to resolve this problem.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1627076"&gt;@Esikhoob&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The file not only has finished without error but is definitely not corrupted! It's another story that you cannot play this file in regular way, because of some upload mistake you have (error that's not reported, cosa Dropbox server cannot know about it). Just as an example see a screenshot of your video posted (on second 3 out of 23:34):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_20240314_163136.png" style="width: 800px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/44732i2FA9E46371B741E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_20240314_163136.png" alt="Screenshot_20240314_163136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; Is that you or whoever you took a shot of? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D88F213CAFB196B6AB70612B08AD9D31/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt;&lt;/P&gt;&lt;P&gt;Dropbox API (and all links produced) gives and expect raw data, not something else! Something you have ignored!!! How you got your data (movie) passed? 🧐&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1627076"&gt;@Esikhoob&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form action="https://content.dropboxapi.com/apitul/1/eE8ccUfewDC6NQ" method="post" enctype="multipart/form-data"&amp;gt;
            &amp;lt;input name="fileDropbox" type="file" class="form-control input-lg" readonly="true" onclick="return false;"&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;That's it. You still receive the same video, but "packed" in multipart form data. And since that's what you have forwarded, exactly the same you receive. Of course, most video players cannot distinguish packed video in such a way. Again, the keyword is raw data!!! Don't ignore it anymore and all will work. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 14:46:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757403#M33126</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2024-03-14T14:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: corrupted file will save on Dropbox`s Temporary link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757427#M33129</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1627076"&gt;@Esikhoob&lt;/a&gt;&amp;nbsp;Здравко is correct; it looks like you're uploading the video as form data, but you need to send the original raw video data, not modified with any formatting or additional encoding. I confirmed that the file you shared starts with "------WebKitFormBoundaryaCK6EdHRBgQMkUuo..Content-Disposition: form-data;". You'll need to update your implement to upload the raw video data only.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:51:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/757427#M33129</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-03-14T15:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: corrupted file will save on Dropbox`s Temporary link</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/759599#M33192</link>
      <description>&lt;P&gt;Yes That is me.&lt;/P&gt;&lt;P&gt;thankyou&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 06:44:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/corrupted-file-will-save-on-Dropbox-s-Temporary-link/m-p/759599#M33192</guid>
      <dc:creator>Esikhoob</dc:creator>
      <dc:date>2024-03-25T06:44:19Z</dc:date>
    </item>
  </channel>
</rss>

