-
-
BraCa started following Invision Community Insider
-
-
Downloads - REST API - Version date is not set
I will try, but just to be clear, do you mean to add to the body new properties named "date" and "updated"? Also, in what format should those values be?
-
Downloads - REST API - Version date is not set
Yes, but it's not PHP, it's written in C#, but here it goes var fileContentsAsByteArray = await File.ReadAllBytesAsync(filepath).ConfigureAwait(false); var fileContents = HttpUtility.UrlEncode(fileContentsAsByteArray); var body = new Dictionary<string, string> { { "category", request.CategoryId.ToString() }, { "author", request.AuthorId.ToString() }, { "title", HttpUtility.UrlEncode(request.Title)}, { "description", HttpUtility.UrlEncode(request.Description)}, { $"files[{request.Filename}]", fileContents}, }; if (!string.IsNullOrWhiteSpace(request.Version)) { body["version"] = HttpUtility.UrlEncode(request.Version); } if (!string.IsNullOrWhiteSpace(request.Changelog)) { body["changelog"] = HttpUtility.UrlEncode(request.Changelog); } var bodyString = body.ConvertToQueryString(); var uriPath = fileId.HasValue ? $"index.php?/downloads/files/{fileId.Value}/history" : "index.php?/downloads/files"; var response = await httpClient.PostAsync<UploadFileResult>( httpClient.BaseAddress, uriPath, bodyString, contentType: "application/x-www-form-urlencoded").ConfigureAwait(false);
-
BraCa started following Downloads - REST API - Version date is not set
-
Downloads - REST API - Version date is not set
Hi, I'm using the REST API to upload files I use the following endpoints: "index.php?/downloads/files" and "index.php?/downloads/files/{fileId}/history" (depending if I'm uploading a new version for an existent file or not) Anyway, regardless of the endpoint, all the files that I uploaded through the API are stored with a version date of "Released January 1, 1970" When I upload them via the website, the version date is stored properly, this only happens when I use the REST API to upload files Thanks
-
Forms Support
Is it normal, that when a guest submits a form, the form author becames my own user?
-
Forms Support
I've sent you a PM
-
Forms Support
Hi, I have a simple form with a couple of fields, where one field is 'Upload' Field Type, so that the user can upload a file if needed. My form when submited creates a new topic. The topic is being created properly, and everything else seems to be working, but the file upload isn't. When I click in the attachment in the topic, I get this error: This is my form And the form settings Any idea what's causing this? Thanks