Skip to content

Type: File handling#108

Closed
baronfel wants to merge 5 commits intofsprojects:devfrom
baronfel:file_endpoints
Closed

Type: File handling#108
baronfel wants to merge 5 commits intofsprojects:devfrom
baronfel:file_endpoints

Conversation

@baronfel
Copy link
Contributor

@baronfel baronfel commented Mar 14, 2018

reworked version of the old pr which addresses #60.

I kept the webapi endpoints because they worked just fine, and reworked a bit how we'd actually handle/represent the file streams.

Doing most of the work was much easier thanks to the MultiPartFormContent type.

My pain right now is what you should see during the test failures:

unknown expression
  TryFinally (WhileLoop (Call (Some (enumerator), MoveNext, []),
    Let (forLoopVar,
      Call (Some (enumerator), get_Current, []),
        Let (name,
          Call (Some (forLoopVar), get_Item1, []),
            Let (data,
              Call (Some (forLoopVar), get_Item2, []),
                Call (Some (content), Add,
                  [Coerce (NewObject (StreamContent, data), HttpContent), name, name]))))),
                    IfThenElse (TypeTest (IDisposable, Coerce (enumerator, Object)),
                      Call (Some (Call (None, UnboxGeneric, [Coerce (enumerator, Object)])), Dispose, []),
                        Value (<null>)))

So my guess is that I'm somehow messing up the iteration on line 208 where we'd add file parts to the overall multipart content.

Thoughts?

@sergey-tihon
Copy link
Member

sergey-tihon commented Mar 14, 2018

@baronfel Please try to replace for loop by Seq.iter - fsprojects/FSharp.TypeProviders.SDK#206

@sergey-tihon sergey-tihon mentioned this pull request Nov 8, 2019
@sergey-tihon
Copy link
Member

Closed in favor of #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants