I am using Parse.File() in cloud code for storing the thumbnail(JPEG),So once user edits profile with new profile image I create a thumbnail with new Parse.File() and saves the data.
Now the case is each new Parse File object creates the new file and uploads on server creating a new file "NAME" in the database which is correct.
But my requirement is that I want to keep the name of the thumbnail same.
i.e
If current name is 1.JPEG then after uploading the image name should remain 1.JPEG.
and if the user is uploading the image first time then it will generate the unique value as per parse File object behavior.
Any updates on this would be very helpful. :)
Related
I have created a Quality Audit in Microsoft Forms that I've Power Automated. This is the first flow i've ever built and could use some help!
After the trigger of When a new response is submitted, the flow works as follows:
Add a row into a table (this works in parallel with the Update a Row below - i'm having no issues with this step)
Update a Row in a table to act as an individual scorecard - where the table has all of the Form questions and the row updates based on the corresponding Get Response Details. Basically all submissions would use the same base Excel file in Onedrive, that has a template that shows the Get Response Details and calculates a score based on an IF formula.
Copy File saves a copy of the template scorecard to the same Onedrive folder, with a unique file name based on the Get Response Details of employee name, date, and form ID.
Get File Metadata Using Path - identical to the path of the Copy File above.
Get File Content based on the ID of the Get File Metadata.
Send an email (V2) to the manager with an attachment (using the Display Name of the Copy File & File Content).
Beginning of flow
Send email V2 flow
As for the problem, after the Form is submitted, the email attachment reflects the File Content of the previous form submission and not the current. But what I interesting is that:
The name of the file is correct based on the Copy File step.
When I look at the actual copy of the file saved to Onedrive - it's correct with all the right info. It's only the email attachment that seems to be an issue.
When I manually re-submit the trigger from the 28 Day Run History, this time the File Content of the emailed scorecard is accurate. Even when it's re-submitted seconds to minutes of the initial submission.
To try to fix:
Added in a Delay (30 seconds to 2 minutes) at various steps thinking that perhaps the flow was completing too quickly - it was copying the file and sending the emailed attachment before the system could update the table. But this had no effect.
Used different dynamic content for the Get File Metadata/Content steps. In addition to ID, I also tried by File Path, Name, & Etag. I also tried the ID of the Copy File instead of the File Metadata. These had no effect.
Did the Copy File first - meaning I saved a copy of the initial blank scorecard to a unique file name and then did Update a Row based on said copied file. But because Update a Row works can only work off one single file and does not have an option for File Path - I could only use ID of Copied File, which did not work.
Tried using Sharepoint instead of Onedrive - same deal.
Used Share Link to Web URL - but when you click the link - it also takes you to a form with the right file name, but the previous submissions file content.
Ideally I need the initial Form submission to show the right data in the emailed scorecard the first time, because I'm not going to go through and manually re-submit the trigger each time a new form is submitted.
Any help and suggestions are greatly appreciated!!
i have costumer's every one i have to upload mullite files
so is there any way to get it?
i create table with
FILE_NAME
FILE_MINETYPE
FILE_CHARSET
i see many video's but they aren't useful for me
You need to create a Page Item with the type File Browse.... Then, under Storage Type, you can use your own custom table or you can use APEX_APPLICATION_TEMP_FILES.
If you use APEX_APPLICATION_TEMP_FILES it will automatically save information about the file type such as file name, mime type, etc. If you use a custom table, you will need to designate which column in the table should hold which file attribute.
You will also need a button or some way of submitting the page. Once the page is submitted, the files will be uploaded and saved to the database.
We are using Google Drive API for uploading data to Google team drive.
https://developers.google.com/apis-explorer/#p/drive/v3
Need advice on below issues.
We wanted to modify CreatedTime field of document which is uploaded to custom date(past date). When we try to update this, we are getting error
"The resource body includes fields which are not directly writable "
Can you please advise if is there any way to update CreateTime to custom date(rather than date when document is getting uploaded)
Same way we also wanted to update CreatedBy property, what we see that Google Drive document has owners property which hold the value of the user who has uploaded document. As we are uploading from custom code we wanted to set this to custom value. Can you please advise if this is possible as we are getting error "The resource body includes fields which are not directly writable "
Not all the files are updatable with the API. Logically speaking a create date is just that the date a file is created changing that would result in invalid data as it would not be true the date it was created was the date it was created.
There is really no way you are going to be able to fix this unless you want to create a file in an hour in which case i sugest you create a new file then and copy the data to that date. This will of course not work if you want to create a file in the past
On the fusion tables website, when creating a new table, you can choose a .kml file. Google will automatically create a name, description and geometry column.
Can you accomplish the same using the importTable call in the API ? When I try uploading a kml file this way, I get the following error:
Google.Apis.Requests.RequestError: Content is empty.[400]
Or do I first have to create the table manually using insert, parse the kml file, and then use importRows call ?
Additionally: if it's possible using ImportTable, is there a way to retrieve the tableId ? It's not in the returned ResumableUploadProgress object.
I am using the Turbogears-2.3 framework and now I know how to upload the files in the database using the tgext.datahelpers. I understand that the file gets uploaded in the disk and in the database the metadata gets stored in the JSON format. Now I want to query the database and wanted that the link to get generated in the file collumn so if someone clicks on it then the file can get downloaded. However when I tried to query the database and viewed the table, in the file column I get text like trai.model.model.F_AttachedFile object at 0xa7325bac (trai is the name of the project).
When I iterated through the table and printed the value of the element in the javascript console, the same thing is getting printed. Could anyone please tell me how to generate the downloadable link from this.
Thank you very much
Not sure that I full understood your question, a little snippet of code might have helped understanding the context, but if I guessed correctly you are trying to the the url of a tgext.datahelpers uploaded file.
In such case see https://bitbucket.org/axant/tgext.datahelpers#rst-header-attachments each attachment Column provides an url property, so you can get the URL from there.
There is also an example that saves and Document model with a file field and queries it back printing the url.